From 0c280a3ce195a43dd0603739aed5b256b49a61b4 Mon Sep 17 00:00:00 2001 From: bitraid Date: Tue, 22 Apr 2025 09:51:56 +0300 Subject: [PATCH] [fish] Simplify commandline call in fzf-file-widget --- shell/key-bindings.fish | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish index a12047c7..b9d827d2 100644 --- a/shell/key-bindings.fish +++ b/shell/key-bindings.fish @@ -144,13 +144,8 @@ function fzf_key_bindings set -lx FZF_DEFAULT_COMMAND "$FZF_CTRL_T_COMMAND" set -lx FZF_DEFAULT_OPTS_FILE - if set -l result (eval (__fzfcmd) --walker-root=$dir --query=$fzf_query | string split0) - # Remove last token from commandline. - commandline -t '' - for i in $result - commandline -it -- $prefix(string escape -- $i)' ' - end - end + set -l result (eval (__fzfcmd) --walker-root=$dir --query=$fzf_query | string split0) + and commandline -rt -- (string join -- ' ' $prefix(string escape -- $result))' ' commandline -f repaint end