summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorbitraid <bitraid@protonmail.ch>2024-12-19 10:31:52 +0200
committerJunegunn Choi <junegunn.c@gmail.com>2024-12-19 20:50:04 +0900
commit7bd298b5360f36e17ae94340d0939c104500f7db (patch)
tree818cb8249d43ecf1e51b3c5daaa9a626f8be6c50 /shell
parent0476a65fca287a1cd17ae3cbdfd8155eb0fb40ad (diff)
downloadfzf-7bd298b5360f36e17ae94340d0939c104500f7db.tar.gz
[fish] Don't strip leading dot (.) character
Fix the removal of the leading dot character from the query, when <Ctrl-T> was pressed and the current command line token started with a dot. It was also removed when <Alt-C> was pressed and the directory didn't exist under the current path.
Diffstat (limited to 'shell')
-rw-r--r--shell/key-bindings.fish2
1 files changed, 1 insertions, 1 deletions
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