discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"openapp AppName.app" versus "openapp ./AppName.app"


From: Ivan Vučica
Subject: "openapp AppName.app" versus "openapp ./AppName.app"
Date: Sat, 31 Dec 2011 20:05:52 +0100

Hi all,

I find it rather annoying to have to type "openapp ./AppName.app". I propose the following patch for openapp, in interest of easier use of bash autocomplete.

Index: openapp.in
===================================================================
--- openapp.in  (revision 34347)
+++ openapp.in  (working copy)
@@ -246,7 +246,8 @@
 if [ -z "$openapp_full_appname" ]; then
   echo "Can't find the required application: $openapp_app!"
   if [ -d "./$openapp_app" ]; then
-    echo "There is a $openapp_app in this directory; please use 'openapp ./$openapp_app' if you want to open it!"
+    echo "Using $0 \"./$openapp_app\""
+    exec "$0" "./$openapp_app"
   fi
   exit 1
 fi

It's most definitely far from perfect, considering it does not pass any arguments appearing after app name. However, it's good enough for most of the cases, especially since it throws a warning which should help the developer that needs that feature understand why the arguments are not passed on.

It is definitely more helpful than previous behavior, and I can't think of any downsides.

--
Ivan Vučica - ivan@vucica.net




--
Ivan Vučica - ivan@vucica.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]