about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-29 22:58:24 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-29 22:58:24 +0000
commitf5c25fe270ba371b0ab5766b430640df70de7c56 (patch)
tree0801d2a079c65d4b8186ff00d18f543e29552cdf /Completion
parent9fd7cbf751de1f3faec8b689132d4401efe02547 (diff)
downloadzsh-f5c25fe270ba371b0ab5766b430640df70de7c56.tar.gz
zsh-f5c25fe270ba371b0ab5766b430640df70de7c56.tar.xz
zsh-f5c25fe270ba371b0ab5766b430640df70de7c56.zip
zsh-workers/8100
Diffstat (limited to 'Completion')
-rw-r--r--Completion/User/_perl_modules20
-rw-r--r--Completion/User/_perldoc23
2 files changed, 23 insertions, 20 deletions
diff --git a/Completion/User/_perl_modules b/Completion/User/_perl_modules
index f43ec8889..ef5c00628 100644
--- a/Completion/User/_perl_modules
+++ b/Completion/User/_perl_modules
@@ -21,22 +21,22 @@ if [[ ${+_perl_modules} -eq 0 ]]; then
   else
     local inc libdir new_pms
     inc=( $( perl -e 'print "@INC"' ) )
-    typeset -agU _perl_modules	# _perl_modules is global, no duplicates
+    typeset -agU _perl_modules  # _perl_modules is global, no duplicates
     _perl_modules=( )
 
     for libdir in $inc; do
-        # Ignore cwd - could be too expensive e.g. if we're near /
-        if [[ $libdir == '.' ]]; then break; fi
+      # Ignore cwd - could be too expensive e.g. if we're near /
+      if [[ $libdir == '.' ]]; then break; fi
 
-	# Find all modules
-	cd $libdir
-        new_pms=( {[A-Z]*/**/,}*.pm(N) )
-	cd $OLDPWD
+      # Find all modules
+      cd $libdir
+      new_pms=( {[A-Z]*/**/,}*.pm(N) )
+      cd $OLDPWD
 
-	# Convert to Perl nomenclature
-	new_pms=( ${new_pms:r:fs#/#::#} )
+      # Convert to Perl nomenclature
+      new_pms=( ${new_pms:r:fs#/#::#} )
 
-        _perl_modules=( $new_pms $_perl_modules )
+      _perl_modules=( $new_pms $_perl_modules )
     done
   fi
 fi
diff --git a/Completion/User/_perldoc b/Completion/User/_perldoc
index acd772b00..54f0d9c08 100644
--- a/Completion/User/_perldoc
+++ b/Completion/User/_perldoc
@@ -6,21 +6,24 @@
 #
 
 _perldoc () {
-    _arguments -s \
-        '-h:help:' \
-        '(-q)-f:Perl built-in function:_perl_builtin_funcs:*:' \
-        '(-f)-q:Perl FAQ keyword:' \
-        '*:Perl pod pages:_perl_pods'
+  _arguments -s \
+    '-h:help:' \
+    '(-q)-f:Perl built-in function:_perl_builtin_funcs:*:' \
+    '(-f)-q:Perl FAQ keyword:' \
+    '*:Perl pod pages:_perl_pods'
 }
 
 _perl_pods () {
-    local nm="$compstate[nmatches]"
+  local nm="$compstate[nmatches]"
+  local expl
+  
+  _perl_modules
+  _perl_basepods
 
-   _perl_modules
-   _perl_basepods
-   _path_files -J 'Perl modules and .pods' -/ -g '*.(pod|pm)'
+  _description expl 'Perl modules and .pods'
+  _path_files "$expl[@]"  -/ -g '*.(pod|pm)'
 
-    [[ nm -ne "$compstate[nmatches]" ]]
+  [[ nm -ne "$compstate[nmatches]" ]]
 }
 
 _perldoc "$@"