From ce4481f9bdfc5f04c91aeccf2bc980878ea3ee87 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Sun, 27 Dec 2020 13:49:22 -0500 Subject: [PATCH] Handle case when completion starts with a space Fixes #1303 Signed-off-by: Marc Khouzam --- fish_completions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish_completions.go b/fish_completions.go index d83649628..2f6d8a043 100644 --- a/fish_completions.go +++ b/fish_completions.go @@ -30,7 +30,7 @@ end function __%[1]s_perform_completion __%[1]s_debug "Starting __%[1]s_perform_completion" - set args (string split -- " " (commandline -c)) + set args (string split -- " " (string trim -l (commandline -c))) set lastArg "$args[-1]" __%[1]s_debug "args: $args"