jaredmichaelwilliams / zsh-templates-osx

Automatically exported from code.google.com/p/zsh-templates-osx
GNU General Public License v2.0
2 stars 0 forks source link

pre-tiger open -a fails to include ~/Applications applications #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use non-tiger open -a completion for an application in ~/Applications

What is the expected output? What do you see instead?
Should include applications in ~/Applications but does not.

Seems like there is an expectation that locate will expand "~", which does
not happen on my Leopard machine.  Replacing ~ with $HOME works.

diff --git a/zsh/local-functions/darwin/_comp_appgetter
b/zsh/local-functions/darwin/_comp_appgetter
index 030f2ca..da85b91 100755
--- a/zsh/local-functions/darwin/_comp_appgetter
+++ b/zsh/local-functions/darwin/_comp_appgetter
@@ -51,8 +51,8 @@
         function FindCocoaApps {
         /usr/bin/locate "/Applications**/*.app" | grep -v Contents

-        if [[ -d ~/Applications ]]; then
-            /usr/bin/locate "~/Applications**/*.app" | grep -v Contents
+        if [[ -d $HOME/Applications ]]; then
+            /usr/bin/locate "$HOME/Applications**/*.app" | grep -v Contents
         fi

         if [[ -d /Developer/Applications ]]; then

Original issue reported on code.google.com by jbsny...@gmail.com on 27 Apr 2008 at 12:40

GoogleCodeExporter commented 8 years ago
Again, thanks.

Original comment by wgsco...@mac.com on 15 Sep 2008 at 5:06

GoogleCodeExporter commented 8 years ago
Committed revision 61.

Original comment by wgsco...@mac.com on 15 Sep 2008 at 5:42