---
tools/bash-completion/vsh.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/bash-completion/vsh.in b/tools/bash-completion/vsh.in
index 70ade50a02..4399ff0a64 100644
--- a/tools/bash-completion/vsh.in
+++ b/tools/bash-completion/vsh.in
@@ -4,7 +4,7 @@
_@command@_complete()
{
- local words cword c=0 i=0 cur RO URI CMDLINE INPUT A
+ local words cword c=0 i=0 cur word RO URI CMDLINE INPUT A
# Here, $COMP_WORDS is an array of words on the bash
# command line that user wants to complete. However, when
@@ -56,7 +56,8 @@ _@command@_complete()
# the name of the command whose arguments are being
# completed.
# Therefore, we might just run $1.
- IFS=$'\n' A=($($1 ${CMDLINE[@]} complete -- "${INPUT[@]}"
2>/dev/null))
+ local IFS=$'\n'
+ A=($($1 ${CMDLINE[@]} complete -- "${INPUT[@]}" 2>/dev/null))
COMPREPLY=($(compgen -W "${A[*]%--}" -- ${cur}))
__ltrim_colon_completions "$cur"
--
2.21.3