Skip to content

Commit aebb073

Browse files
authored
Merge pull request #985 from akinomyoga/_comp_compgen-5
fix: add misc fixes before `_comp_compgen_split`
2 parents a710a31 + f37f221 commit aebb073

File tree

9 files changed

+11
-12
lines changed

9 files changed

+11
-12
lines changed

completions/7z

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ _comp_cmd_7z()
102102
else
103103
if [[ ${words[1]} == d ]]; then
104104
local IFS=$'\n'
105-
COMPREPLY=($(compgen -W "$(printf '%s\n' "$("$1" l "${words[2]}" \
105+
COMPREPLY=($(compgen -W "$("$1" l "${words[2]}" \
106106
-slt 2>/dev/null | command sed -n '/^Path =/s/^Path = \(.*\)$/\1/p' \
107-
2>/dev/null | tail -n+2)")" -- "$cur"))
107+
2>/dev/null | tail -n+2)" -- "$cur"))
108108
compopt -o filenames
109109
else
110110
_comp_compgen_filedir

completions/curl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ _comp_cmd_curl()
156156

157157
if [[ $cur == -* ]]; then
158158
_comp_compgen_help -- --help all
159-
[[ ${COMPREPLY-} ]] ||
160-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
159+
[[ ${COMPREPLY-} ]] || _comp_compgen_help
161160
fi
162161
} &&
163162
complete -F _comp_cmd_curl curl

completions/koji

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ _comp_cmd_koji()
235235
fi
236236

237237
if [[ $cur == -* ]]; then
238-
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
238+
_comp_compgen_help
239239
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
240240
elif [[ ! $has_command ]]; then
241241
COMPREPLY=($(compgen -W '$("$1" --help-commands 2>/dev/null | \

completions/lspci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ _comp_cmd_lspci()
1818
return
1919
;;
2020
-*A)
21-
COMPREPLY+=($(compgen -W '$("$1" -A help | command grep -vF :)' \
21+
COMPREPLY=($(compgen -W '$("$1" -A help | command grep -vF :)' \
2222
-- "$cur"))
2323
return
2424
;;
2525
-*H)
26-
_comp_compgen -a -- -W "1 2"
26+
_comp_compgen -- -W "1 2"
2727
return
2828
;;
2929
-*F)

completions/medusa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ _comp_cmd_medusa()
1616
;;
1717
-*M)
1818
COMPREPLY=($(compgen -W "$("$1" -d | awk '/^ +\+/ {print $2}' |
19-
command sed -e 's/\.mod$//')"))
19+
command sed -e 's/\.mod$//')" -- "$cur"))
2020
return
2121
;;
2222
esac

completions/pgrep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ _comp_cmd_pgrep()
3737
;;
3838
--nslist)
3939
COMPREPLY=(
40-
$(IFS="$IFS," compgen -W '$("$1" --help 2>&1 |
40+
$(IFS=$' \t\n,' compgen -W '$("$1" --help 2>&1 |
4141
command sed -ne \
4242
"s/^[[:space:]]*Available namespaces://p")' \
4343
-- "${cur##*,}"))

completions/pydoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ _comp_cmd_pydoc()
3333
COMPREPLY+=($(compgen -W \
3434
'$("$1" keywords topics | command sed -e /^Here/d)' -- "$cur"))
3535

36-
_comp_compgen_filedir py
36+
_comp_compgen -a filedir py
3737
} &&
3838
complete -F _comp_cmd_pydoc pydoc pydoc3
3939

completions/reportbug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ _comp_cmd_reportbug()
3030
return
3131
;;
3232
--tag | --ui | --interface | --type | --bts | --severity | --mode | -${noargopts}[TutBS])
33-
COMPREPLY+=($(
33+
COMPREPLY=($(
3434
compgen -W \
3535
'$("$1" "$prev" help 2>&1 | sed -ne "/^[[:space:]]/p")' \
3636
-- "$cur"

completions/tar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ _comp_cmd_tar__try_list_archive()
437437
while read -r line; do
438438
printf "%q\n" "$(printf %q"\n" "$line")"
439439
done
440-
)" -- "$(printf "%q\n" "$cur")"))
440+
)" -- "$(printf %q "$cur")"))
441441
return 0
442442
fi
443443
}

0 commit comments

Comments
 (0)