Skip to content

Commit

Permalink
fix(_get_cword_at_cursor,cvs): quote array length
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Aug 20, 2023
1 parent 743d0a9 commit 201239c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bash_completion
Expand Up @@ -838,7 +838,7 @@ _comp__get_cword_at_cursor()
fi

local IFS=$' \t\n'
local "$2" "$3" "$4" && _comp_upvars -a${#words[@]} "$2" ${words[@]+"${words[@]}"} \
local "$2" "$3" "$4" && _comp_upvars -a"${#words[@]}" "$2" ${words[@]+"${words[@]}"} \
-v "$3" "$cword" -v "$4" "${cur:0:index}"
}

Expand Down
2 changes: 1 addition & 1 deletion completions/cvs
Expand Up @@ -43,7 +43,7 @@ _comp_xfunc_cvs_compgen_roots()
local -a cvsroots=()
[[ -v CVSROOT ]] && cvsroots=("$CVSROOT")
[[ -r ~/.cvspass ]] && cvsroots+=($(awk '{ print $2 }' ~/.cvspass))
[[ -r CVS/Root ]] && mapfile -tO ${#cvsroots[@]} cvsroots <CVS/Root
[[ -r CVS/Root ]] && mapfile -tO "${#cvsroots[@]}" cvsroots <CVS/Root
((${#cvsroots[@]})) &&
_comp_compgen -- -W '"${cvsroots[@]}"'
_comp_ltrim_colon_completions "$cur"
Expand Down

0 comments on commit 201239c

Please sign in to comment.