From 7bd298b5360f36e17ae94340d0939c104500f7db Mon Sep 17 00:00:00 2001 From: bitraid Date: Thu, 19 Dec 2024 10:31:52 +0200 Subject: [PATCH] [fish] Don't strip leading dot (.) character Fix the removal of the leading dot character from the query, when was pressed and the current command line token started with a dot. It was also removed when was pressed and the directory didn't exist under the current path. --- shell/key-bindings.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish index 745a89f1..06955b69 100644 --- a/shell/key-bindings.fish +++ b/shell/key-bindings.fish @@ -172,7 +172,7 @@ function fzf_key_bindings # BUG: on combined expressions, if a left argument is a single `!`, the # builtin test command of fish will treat it as the ! operator. To # overcome this, have the variable parts on the right. - if test "." = "$dir" -a "." != (string sub -l 1 -- $commandline) + if test "." = "$dir" -a "./" != (string sub -l 2 -- $commandline) # if $dir is "." but commandline is not a relative path, this means no file path found set fzf_query $commandline else