From dcc45ed860f24c2103377f5782bffefbfc12bb63 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Wed, 15 Nov 2000 16:33:53 +0000 Subject: Avoid cd in _perl_modules. --- Completion/User/_perl_modules | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Completion/User/_perl_modules') 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 -- cgit v1.2.3