diff --git a/fish_completions.go b/fish_completions.go index b0db323ac..bb57fd568 100644 --- a/fish_completions.go +++ b/fish_completions.go @@ -152,11 +152,11 @@ function __%[1]s_prepare_completions # We don't need descriptions anyway since there is only a single # real completion which the shell will expand immediately. set -l split (string split --max 1 \t $__%[1]s_comp_results[1]) - + # Fish won't add a space if the completion ends with any # of the following characters: @=/:., set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" + if not string match -r -q "[@=/:.,]" -- "$lastChar" # In other cases, to support the "nospace" directive we trick the shell # by outputting an extra, longer completion. __%[1]s_debug "Adding second completion to perform nospace directive"