Browse Source

drop the foreach, make it even shorter. thanks Marc Cornellà!

Frank Louwers 11 years ago
parent
commit
bce74975d0
1 changed files with 2 additions and 5 deletions
  1. 2 5
      plugins/pj/pj.plugin.zsh

+ 2 - 5
plugins/pj/pj.plugin.zsh

@@ -41,11 +41,8 @@ alias pjo="pj open"
 function _pj () {
     # might be possible to improve this using glob, without the basename trick
     typeset -a projects
-    foreach i ($PROJECT_PATHS/*)
-    do
-        projects+=(${i##*/})
-    done
-
+    projects=($PROJECT_PATHS/*)
+    projects=$projects:t 
     _arguments '*:file:($projects)'
 }