fix: We don't need an extra empty character when we're doing proper quoting.

Signed-off-by: Jeffrey Faer <jeffrey.faer@gmail.com>
This commit is contained in:
Jeffrey Faer 2024-04-19 23:25:37 -06:00
parent d131fa6e88
commit 497d36cfc1
1 changed files with 0 additions and 7 deletions

View File

@ -68,13 +68,6 @@ __%[1]s_get_completion_results() {
lastChar=${lastParam:$((${#lastParam}-1)):1} lastChar=${lastParam:$((${#lastParam}-1)):1}
__%[1]s_debug "lastParam ${lastParam}, lastChar ${lastChar}" __%[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>) # When completing a flag with an = (e.g., %[1]s -n=<TAB>)
# bash focuses on the part after the =, so we need to remove # bash focuses on the part after the =, so we need to remove
# the flag part from $cur # the flag part from $cur