From c09b5c7988cadd70a3d1dad19712a10ad85208c3 Mon Sep 17 00:00:00 2001 From: Adam Sanderson Date: Mon, 16 Aug 2010 21:12:33 -0700 Subject: [PATCH] Allow people to not use textmate in the unlikely event that they use something else ;) --- qwandry.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qwandry.rb b/qwandry.rb index 038f654..9722d04 100755 --- a/qwandry.rb +++ b/qwandry.rb @@ -62,8 +62,9 @@ module Qwandry end end - def launch(package) - `mate #{package.paths.join(' ')}` + def launch(package, editor=nil) + editor ||= ENV['VISUAL'] || ENV['EDITOR'] + system editor, *package.paths end module_function :launch