From 13582d8d2b272504a5360dd553f77fa5969e7a95 Mon Sep 17 00:00:00 2001 From: Jonathan Knapp Date: Thu, 8 Aug 2013 11:46:15 -0600 Subject: [PATCH] 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