Skip to content

Commit 41236da

Browse files
committed
fix(gdb): work around bash 4.4 ${v+"$@"}
1 parent ca8e240 commit 41236da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

completions/gdb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ _comp_cmd_gdb()
1515

1616
# gdb [options] [executable-file [core-file or process-id]]
1717
if ((cword == 1)); then
18-
local IFS
1918
compopt -o filenames
2019
if _comp_looks_like_path "$cur"; then
2120
# compgen -c works as expected if $cur contains any slashes.
@@ -28,6 +27,8 @@ _comp_cmd_gdb()
2827
local path_array
2928
_comp_compgen -Rv path_array split -F : -X '' -- "$PATH"
3029
_comp_compgen_split -o plusdirs -- "$(
30+
# Note: ${v+"$@"} does not work with empty IFS in bash < 4.4
31+
IFS=$' \t\n'
3132
find ${path_array[@]+"${path_array[@]}"} . -mindepth 1 \
3233
-maxdepth 1 -not -type d -executable -printf '%f\n' \
3334
2>/dev/null

0 commit comments

Comments
 (0)