From bce74975d055529cbd186782e2fd99e6da840460 Mon Sep 17 00:00:00 2001 From: Frank Louwers Date: Wed, 28 May 2014 13:57:25 +0200 Subject: drop the foreach, make it even shorter. thanks Marc Cornellà! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/pj/pj.plugin.zsh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh index dac561189..f9cbddf1a 100644 --- a/plugins/pj/pj.plugin.zsh +++ b/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)' } -- cgit v1.2.3-70-g09d2