diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-25 20:00:23 +0200 |
|---|---|---|
| committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-25 20:00:23 +0200 |
| commit | a958ccde50b9fa4feee7432adc134fcfd4fbad83 (patch) | |
| tree | fb200c348e89b5abbd56990040f9749c02ed1da0 /completions | |
| parent | bcf41c74c2528aa76fb01c2178585135ec9e5dbd (diff) | |
| download | bash-completion-a958ccde50b9fa4feee7432adc134fcfd4fbad83.tar.gz | |
perldoc: Add some option arg completions, use _parse_help.
Diffstat (limited to 'completions')
| -rw-r--r-- | completions/perl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/completions/perl b/completions/perl index a67c7699..8b296377 100644 --- a/completions/perl +++ b/completions/perl @@ -99,16 +99,22 @@ _perldoc() local perl="${1%doc}" [[ $perl == $1 ]] || ! type $perl &>/dev/null && perl= - # complete builtin perl functions case $prev in + -h|-V|-n|-o|-M|-w|-L) + return 0 + ;; + -d) + _filedir + return 0 + ;; -f) _perlfunctions $perl - return 0 + return 0 ;; esac if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h -v -t -u -m -l -F -X -f -q' -- "$cur" )) + COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) ) else # return available modules (unless it is clearly a file) if [[ "$cur" != @(*/|[.~])* ]]; then |
