File tree Expand file tree Collapse file tree 19 files changed +57
-39
lines changed Expand file tree Collapse file tree 19 files changed +57
-39
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ _comp_cmd_chronyc()
2929 esac
3030
3131 if [[ $cur == -* ]]; then
32- COMPREPLY=($( compgen -W ' $(_parse_usage "$1") -6' -- " $cur " ) )
32+ _comp_compgen_usage
33+ _comp_compgen -a -- -W ' -6'
3334 return
3435 fi
3536
Original file line number Diff line number Diff line change @@ -408,9 +408,9 @@ _comp_cmd_cvs()
408408 ;;
409409 esac
410410
411- COMPREPLY=( $( compgen -W ' $(_cvs_commands)
412- $(_parse_help "$1" --help-options ) --help --help-commands
413- --help-options --version ' -- " $cur " ) )
411+ _comp_compgen_help -- --help-options
412+ _comp_compgen -a -- -W ' $(_cvs_commands ) --help
413+ --help-commands --help-options --version '
414414 ;;
415415 esac
416416
Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ _comp_cmd_dd()
3131 ;;
3232 esac
3333
34- COMPREPLY=( $( compgen -W ' $(_parse_help "$1") ' -- " $cur " )
35- $( compgen -W ' bs cbs conv count ibs if iflag obs of oflag
36- seek skip status' -S ' =' -- " $cur " ) )
34+ _comp_compgen_help
35+ _comp_compgen -a -- -W ' bs cbs conv count ibs if iflag obs of oflag
36+ seek skip status' -S ' ='
3737 [[ ${COMPREPLY-} == * = ]] && compopt -o nospace
3838} &&
3939 complete -F _comp_cmd_dd dd
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ _comp_cmd_dsniff()
1717 esac
1818
1919 if [[ $cur == -* ]]; then
20- COMPREPLY=($( compgen -W ' $(_parse_usage "$1") -r -w -p' -- " $cur " ) )
20+ _comp_compgen_usage
21+ _comp_compgen -a -- -W ' -r -w -p'
2122 fi
2223
2324} &&
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ _comp_cmd_ether_wake()
1616 esac
1717
1818 if [[ $cur == -* ]]; then
19- COMPREPLY=($( compgen -W ' $(_parse_help "$1" -u) -V' -- " $cur " ) )
19+ _comp_compgen_help -- -u
20+ _comp_compgen -a -- -W ' -V'
2021 return
2122 fi
2223
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ _comp_cmd_export()
4646 ;;
4747 * )
4848 if [[ $cword -eq 1 && $cur == -* ]]; then
49- COMPREPLY=($( compgen -W ' -p $(_parse_usage help "-s $1")' -- " $cur " ) )
49+ _comp_compgen_usage -c help -s " $1 "
50+ _comp_compgen -a -- -W ' -p'
5051 return
5152 fi
5253 local suffix=" "
Original file line number Diff line number Diff line change @@ -140,13 +140,10 @@ _comp_cmd_fio()
140140 [[ $was_split ]] && return
141141
142142 if [[ $cur == -* ]]; then
143- COMPREPLY=($(
144- compgen -W '
145- $(_parse_help "$1")
146- $("$1" --cmdhelp=all 2>/dev/null | \
147- awk "{printf \"--%s=\n\", \$1}")
148- ' -- " $cur "
149- ) )
143+ _comp_compgen_help
144+ local stdout=$( " $1 " --cmdhelp=all 2> /dev/null |
145+ awk ' {printf "--%s=\n", $1}' )
146+ _comp_compgen -a -- -W ' $stdout'
150147 [[ ${COMPREPLY-} == * = ]] && compopt -o nospace
151148 return
152149 fi
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ _comp_cmd_gzip()
1919 esac
2020
2121 if [[ $cur == -* ]]; then
22- COMPREPLY=($( compgen -W ' $(_parse_help "$1") {-1..-9}' -- " $cur " ) )
22+ _comp_compgen_help
23+ _comp_compgen -a -- -W ' -{1..9}'
2324 [[ ${COMPREPLY-} == * = ]] && compopt -o nospace
2425 return
2526 fi
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ _comp_cmd_hddtemp()
2828 [[ $was_split ]] && return
2929
3030 if [[ $cur == -* ]]; then
31- COMPREPLY=($( compgen -W ' $(_parse_help "$1") --help' -- " $cur " ) )
31+ _comp_compgen_help
32+ _comp_compgen -a -- -W ' --help'
3233 [[ ${COMPREPLY-} == * = ]] && compopt -o nospace
3334 else
3435 _comp_compgen -c " ${cur:-/ dev/ } " filedir
Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ _comp_cmd_json_xs()
2323 ;;
2424 esac
2525
26- [[ $cur == -* ]] &&
27- COMPREPLY=($( compgen -W ' $(_parse_usage "$1") -f' -- " $cur " ) )
26+ if [[ $cur == -* ]]; then
27+ _comp_compgen_usage
28+ _comp_compgen -a -- -W ' -f'
29+ fi
2830} &&
2931 complete -F _comp_cmd_json_xs json_xs
3032
You can’t perform that action at this time.
0 commit comments