From a7e6116a2bf224c0ca494b4038f2e726de8272c9 Mon Sep 17 00:00:00 2001 From: Timo Borer Date: Mon, 30 Mar 2026 12:14:05 +0200 Subject: [PATCH] fix: Use correct fish args for completions --- templates/fish.fish | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/fish.fish b/templates/fish.fish index f55efea..4bc1915 100644 --- a/templates/fish.fish +++ b/templates/fish.fish @@ -15,11 +15,12 @@ function {{ lacy_cmd }} end end function __{{ lacy_cmd }}_autocomplete - set args $argv - if test "$args" = "" + set query (string split " " (commandline -c)) + set query (string join " " $query[2..-1]) + if test "$query" = "" ls -D --icons=never -1 else - set dirs (string split ' ' (lacy complete -- "$args")) + set dirs (string split ' ' (lacy complete -- "$query")) for dir in $dirs basename $dir end @@ -27,4 +28,4 @@ function __{{ lacy_cmd }}_autocomplete end complete --no-files lacy -x -a "prompt complete init help" complete --no-files {{ lacy_cmd }} -r -a "(__{{ lacy_cmd }}_autocomplete)" -# END generated Lacy shell config \ No newline at end of file +# END generated Lacy shell config