File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ _comp_cmd_puppet()
65
65
local cur prev words cword comp_args
66
66
_comp_initialize -- " $@ " || return
67
67
68
- local subcommand action
68
+ local subcommand= " " action
69
69
70
70
case $prev in
71
71
-h | --help | -V | --version)
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ _comp_cmd_valgrind()
13
13
fi
14
14
done
15
15
16
- local word tool
16
+ local word tool= " "
17
17
for word in " ${words[@]: 1} " ; do
18
18
if [[ $word == --tool= ?* ]]; then
19
19
tool=$word
@@ -70,7 +70,7 @@ _comp_cmd_valgrind()
70
70
# generic cases parsed from --help output
71
71
--+ ([-A-Za-z0-9_]))
72
72
# shellcheck disable=SC2086
73
- local value=$( " $1 " --help-debug ${ tool-} 2> /dev/null |
73
+ local value=$( " $1 " --help-debug $tool 2> /dev/null |
74
74
command sed \
75
75
-ne " s|^[[:blank:]]*$prev =\([^[:blank:]]\{1,\}\).*|\1|p" )
76
76
case $value in
@@ -101,7 +101,7 @@ _comp_cmd_valgrind()
101
101
[[ $was_split ]] && return
102
102
103
103
if [[ $cur == -* ]]; then
104
- COMPREPLY=($( compgen -W ' $(_parse_help "$1" "--help ${ tool-} ")' \
104
+ COMPREPLY=($( compgen -W ' $(_parse_help "$1" "--help $tool")' \
105
105
-- " $cur " ) )
106
106
[[ ${COMPREPLY-} == * = ]] && compopt -o nospace
107
107
return
You can’t perform that action at this time.
0 commit comments