From 1321ddc844cb06d869ac93bb3dd157d8ed017a71 Mon Sep 17 00:00:00 2001 From: Jonathan Knapp Date: Mon, 15 Jul 2013 22:20:12 -0400 Subject: [PATCH 1/2] Added sublime text plugin that passes additional arguments to the app --- plugins/sublime/subl.fish | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 plugins/sublime/subl.fish diff --git a/plugins/sublime/subl.fish b/plugins/sublime/subl.fish new file mode 100644 index 0000000..3f03ca9 --- /dev/null +++ b/plugins/sublime/subl.fish @@ -0,0 +1,3 @@ +function subl --description 'Open Sublime Text 2' + "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" $argv +end From 13582d8d2b272504a5360dd553f77fa5969e7a95 Mon Sep 17 00:00:00 2001 From: Jonathan Knapp Date: Thu, 8 Aug 2013 11:46:15 -0600 Subject: [PATCH 2/2] test that application exists before trying to call it --- plugins/sublime/subl.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/sublime/subl.fish b/plugins/sublime/subl.fish index 3f03ca9..89fc3a2 100644 --- a/plugins/sublime/subl.fish +++ b/plugins/sublime/subl.fish @@ -1,3 +1,5 @@ function subl --description 'Open Sublime Text 2' - "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" $argv + if test -d "/Applications/Sublime Text 2.app" + "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" $argv + end end