diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2012-09-30 16:14:30 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2012-09-30 16:14:30 +0000 |
commit | 059501fa7dff16315aeefe8ea4c22d60a448154a (patch) | |
tree | 6c27a93a511f9088c0f2d98268f2ba76994ba0ed | |
parent | 2e6363ed505157fd09f3f473356912bddf8ba640 (diff) | |
download | zsh-059501fa7dff16315aeefe8ea4c22d60a448154a.tar.gz zsh-059501fa7dff16315aeefe8ea4c22d60a448154a.tar.xz zsh-059501fa7dff16315aeefe8ea4c22d60a448154a.zip |
Aaron Schrab: 30710: perldoc completion updates
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Completion/Unix/Command/_perldoc | 15 |
2 files changed, 17 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index d1ed83a0d..8c78c7737 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-09-30 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * Aaron Schrab: 30710: Completion/Unix/Command/_perldoc: updates. + 2012-09-29 Frank Terbeck <ft@bewatermyfriend.org> * Seth House: 30702: Doc/Zsh/contrib.yo, @@ -192,5 +196,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5727 $ +* $Revision: 1.5728 $ ***************************************************** diff --git a/Completion/Unix/Command/_perldoc b/Completion/Unix/Command/_perldoc index 8c816b502..3e58d5a50 100644 --- a/Completion/Unix/Command/_perldoc +++ b/Completion/Unix/Command/_perldoc @@ -15,14 +15,15 @@ fi _arguments -C -s -S -A "-*" \ '(- *)-h[print help information]' \ '(- *)-V[display version information]' \ - '-v[verbose output]' \ + '-D[describe search for the item]' \ '-t[use plain text output instead of nroff]' \ '-u[show raw Pod source]' \ '*-m[display entire module]:module:_perl_modules' \ '-l[display only filename of the module found]' \ '-F[consider arguments as filenames]' \ - '(-q)-f+[view documentation for Perl built-in function]:perl builtin function:->perl-builtin-funcs' \ - '(-f)-q+[search question headings in Perl FAQ]:regular expression' \ + '(-q -v)-f+[view documentation for Perl built-in function]:perl builtin function:->perl-builtin-funcs' \ + '(-f -v)-q+[search question headings in Perl FAQ]:regular expression' \ + '(-f -q)-v+[view documentation for predefined variable]:special variable:->perl-variables' \ '(-d)-T[send output direct to stdout and not via pager]' \ '(-T)-d+[specify output file]:output file:_files' \ '-o+[specify output format]:output format:(man nroff pod rtf text tk xml latex)' \ @@ -54,6 +55,14 @@ case $state in 'files:module or .pod file:_files -g "*.(pod|pm)(-.)"' && ret=0 fi ;; + + perl-variables) + : ${(A)_perl_special_vars:=${(u)${${${(M)${(f)"$(_call_program variables \ + perldoc -u perlvar 2>/dev/null)"}:#\=item [\$\@\%]*}#* }:#\$<I*}}} + + _wanted variables expl 'perl special variable' compadd "$@" -a - \ + _perl_special_vars && ret=0 + ;; esac return ret |