summaryrefslogtreecommitdiffstats
path: root/shell/key-bindings.fish
diff options
context:
space:
mode:
authorChristoph Anton Mitterer <mail@christoph.anton.mitterer.name>2023-09-24 00:04:28 +0200
committerJunegunn Choi <junegunn.c@gmail.com>2023-09-24 13:23:40 +0900
commit8eec50d764878628236566e0ef9767688b6de8d0 (patch)
tree1dcfd9cf37520de44c645b14bef21b328eed3828 /shell/key-bindings.fish
parent32b659b3462d4b9e22df87dad805e2f3b49f1775 (diff)
[shell] don’t needlessly escape `.` in shell pattern
`find`’s `-path`-option is described to use shell patterns (i.e. POSIX’ pattern matching notation). In that, `.` is not a special character, thus escaping it shouldn’t be necessary. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Diffstat (limited to 'shell/key-bindings.fish')
-rw-r--r--shell/key-bindings.fish6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish
index 742f3d2b..abaefead 100644
--- a/shell/key-bindings.fish
+++ b/shell/key-bindings.fish
@@ -22,10 +22,10 @@ function fzf_key_bindings
set -l fzf_query $commandline[2]
set -l prefix $commandline[3]
- # "-path \$dir'*/\\.*'" matches hidden files/folders inside $dir but not
+ # "-path \$dir'*/.*'" matches hidden files/folders inside $dir but not
# $dir itself, even if hidden.
test -n "$FZF_CTRL_T_COMMAND"; or set -l FZF_CTRL_T_COMMAND "
- command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
+ command find -L \$dir -mindepth 1 \\( -path \$dir'*/.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
-o -type f -print \
-o -type d -print \
-o -type l -print 2> /dev/null | sed 's@^\./@@'"
@@ -79,7 +79,7 @@ function fzf_key_bindings
set -l prefix $commandline[3]
test -n "$FZF_ALT_C_COMMAND"; or set -l FZF_ALT_C_COMMAND "
- command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
+ command find -L \$dir -mindepth 1 \\( -path \$dir'*/.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
-o -type d -print 2> /dev/null | sed 's@^\./@@'"
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
begin