diff --git a/fish_completions.go b/fish_completions.go index c942de963..a09938879 100644 --- a/fish_completions.go +++ b/fish_completions.go @@ -58,7 +58,7 @@ function __%[1]s_perform_completion # Let's ignore them or else it will break completion. # Ref: https://github.com/spf13/cobra/issues/1279 for line in $results[-1..1] - if test (string trim $line) = "" + if test (string trim -- $line) = "" # Found an empty line, remove it set results $results[1..-2] else