Skip to content

Commit 236c9ba

Browse files
committed
refactor: use _comp_compgen_help for trivial _parse_{help,usage}
1 parent ff51d67 commit 236c9ba

File tree

230 files changed

+296
-302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+296
-302
lines changed

completions/2to3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ _comp_cmd_2to3()
2727
[[ $was_split ]] && return
2828

2929
if [[ $cur == -* ]]; then
30-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
30+
_comp_compgen_help
3131
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
3232
return
3333
fi

completions/_adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ _comp_cmd_adb()
3737
if [[ ! $has_cmd ]]; then
3838
local tmp=()
3939
if [[ ! $cur || $cur == -* ]]; then
40-
tmp+=($(compgen -W '$(_parse_help "$1" help)' -- "$cur"))
40+
_comp_compgen -av tmp help -- help
4141
fi
4242
if [[ ! $cur || $cur != -* ]]; then
4343
tmp+=($("$1" help 2>&1 | awk '$1 == "adb" { print $2 }'))

completions/_eject

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _comp_cmd_eject()
1919
esac
2020

2121
if [[ $cur == -* ]]; then
22-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
22+
_comp_compgen_help
2323
return
2424
elif [[ $prev == @(-d|--default) ]]; then
2525
return

completions/_ionice

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ _comp_cmd_ionice()
5151
esac
5252

5353
if [[ $cur == -* ]]; then
54-
COMPREPLY=($(compgen -W '$(_parse_help "$1" -h)' -- "$cur"))
54+
_comp_compgen_help -- -h
5555
return
5656
fi
5757
} &&

completions/_mock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ _comp_cmd_mock()
5858
[[ $was_split ]] && return
5959

6060
if [[ $cur == -* ]]; then
61-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
61+
_comp_compgen_help
6262
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
6363
else
6464
_comp_compgen_filedir '@(?(no)src.r|s)pm'

completions/_repomanage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ _comp_cmd_repomanage()
1313
[[ $was_split ]] && return
1414

1515
if [[ $cur == -* ]]; then
16-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
16+
_comp_compgen_help
1717
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
1818
else
1919
_comp_compgen_filedir -d

completions/_reptyr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ _comp_cmd_reptyr()
1515
esac
1616

1717
if [[ $cur == -* ]]; then
18-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
18+
_comp_compgen_help
1919
return
2020
fi
2121

completions/_rtcwake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ _comp_cmd_rtcwake()
2626

2727
[[ $was_split ]] && return
2828

29-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
29+
_comp_compgen_help
3030
} &&
3131
complete -F _comp_cmd_rtcwake rtcwake
3232

completions/_su

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ _comp_cmd_su()
2929
[[ $was_split ]] && return
3030

3131
if [[ $cur == -* ]]; then
32-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
32+
_comp_compgen_help
3333
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
3434
return
3535
fi

completions/_yum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ _comp_cmd_yum()
141141
[[ $was_split ]] && return
142142

143143
if [[ $cur == -* ]]; then
144-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
144+
_comp_compgen_help
145145
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
146146
fi
147147
} &&

0 commit comments

Comments
 (0)