Skip to content

Commit

Permalink
fix: We don't need an extra empty character when we're doing proper q…
Browse files Browse the repository at this point in the history
…uoting.
  • Loading branch information
JeffFaer committed Apr 20, 2024
1 parent 3c78872 commit fcc5b8c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions bash_completionsV2.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ __%[1]s_get_completion_results() {
lastChar=${lastParam:$((${#lastParam}-1)):1}
__%[1]s_debug "lastParam ${lastParam}, lastChar ${lastChar}"
if [[ -z ${cur} && ${lastChar} != = ]]; then
# If the last parameter is complete (there is a space following it)
# We add an extra empty parameter so we can indicate this to the go method.
__%[1]s_debug "Adding extra empty parameter"
requestComp="${requestComp} ''"
fi
# When completing a flag with an = (e.g., %[1]s -n=<TAB>)
# bash focuses on the part after the =, so we need to remove
# the flag part from $cur
Expand Down

0 comments on commit fcc5b8c

Please sign in to comment.