diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2000-11-15 16:33:53 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2000-11-15 16:33:53 +0000 |
commit | dcc45ed860f24c2103377f5782bffefbfc12bb63 (patch) | |
tree | 98a4d25376bd1b7da19632579f7bc021afc3a1db | |
parent | ea807260e4027adfa100dd2b3dde31baa99fad4d (diff) | |
download | zsh-dcc45ed860f24c2103377f5782bffefbfc12bb63.tar.gz zsh-dcc45ed860f24c2103377f5782bffefbfc12bb63.tar.xz zsh-dcc45ed860f24c2103377f5782bffefbfc12bb63.zip |
Avoid cd in _perl_modules.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Completion/User/_perl_modules | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 872a88083..af740472c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-11-15 Bart Schaefer <schaefer@zsh.org> + + * 13167: Completion/User/_perl_modules: Avoid cd entirely. + 2000-11-14 Bart Schaefer <schaefer@zsh.org> * 13165 plus unposted: Completion/User/_perl_modules: `builtin cd' diff --git a/Completion/User/_perl_modules b/Completion/User/_perl_modules index 2ac7e9cbb..9bfc0463d 100644 --- a/Completion/User/_perl_modules +++ b/Completion/User/_perl_modules @@ -67,13 +67,12 @@ _perl_modules () { for libdir in $inc; do # Ignore cwd - could be too expensive e.g. if we're near / - if [[ $libdir == '.' ]]; then break; fi + if [[ $libdir == '.' ]]; then continue; fi # Find all modules if [[ -d $libdir && -x $libdir ]]; then - builtin cd $libdir - new_pms=( {[A-Z]*/***/,}*.pm~*blib* ) - builtin cd $OLDPWD + new_pms=( $libdir/{[A-Z]*/***/,}*.pm~*blib* ) + new_pms=( "${(@)new_pms##$libdir/##}" ) fi # Convert to Perl nomenclature |