Skip to content

Instantly share code, notes, and snippets.

@collin
Created November 7, 2008 18:27
Show Gist options
  • Save collin/22934 to your computer and use it in GitHub Desktop.
Save collin/22934 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
# Copyright (c) 2004 - 2008 Beanlogic Limited
#
# This file is part of gedit_on_rails.
# You should have received a copy of the GNU General Public License
# along with gedit_on_rails. If not, see <http://www.gnu.org/licenses/>.
GEDIT = `which gedit`.chomp
url = ARGV.first.dup
url.gsub!("txmt://open?url=", '')
file, line = url.split('&line=')
`#{GEDIT} #{file} +#{line}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment