Skip to content

Commit e965294

Browse files
committed
refactor(gdb): use _comp_compgen
1 parent 2ea812f commit e965294

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

completions/gdb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ _comp_cmd_gdb()
1919
compopt -o filenames
2020
if _comp_looks_like_path "$cur"; then
2121
# compgen -c works as expected if $cur contains any slashes.
22-
IFS=$'\n'
23-
COMPREPLY=($(PATH="$PATH:." compgen -d -c -- "$cur"))
22+
local PATH="$PATH:."
23+
_comp_compgen -- -d -c
2424
else
2525
# otherwise compgen -c contains Bash's built-in commands,
2626
# functions and aliases. Thus we need to retrieve the program

0 commit comments

Comments
 (0)