mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-01-20 09:16:34 +01:00
drop the foreach, make it even shorter. thanks Marc Cornellà!
This commit is contained in:
@@ -41,11 +41,8 @@ alias pjo="pj open"
|
|||||||
function _pj () {
|
function _pj () {
|
||||||
# might be possible to improve this using glob, without the basename trick
|
# might be possible to improve this using glob, without the basename trick
|
||||||
typeset -a projects
|
typeset -a projects
|
||||||
foreach i ($PROJECT_PATHS/*)
|
projects=($PROJECT_PATHS/*)
|
||||||
do
|
projects=$projects:t
|
||||||
projects+=(${i##*/})
|
|
||||||
done
|
|
||||||
|
|
||||||
_arguments '*:file:($projects)'
|
_arguments '*:file:($projects)'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user