diff options
| author | Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> | 2023-09-24 00:04:28 +0200 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-09-24 13:23:40 +0900 |
| commit | 8eec50d764878628236566e0ef9767688b6de8d0 (patch) | |
| tree | 1dcfd9cf37520de44c645b14bef21b328eed3828 /shell/key-bindings.zsh | |
| parent | 32b659b3462d4b9e22df87dad805e2f3b49f1775 (diff) | |
| download | fzf-8eec50d764878628236566e0ef9767688b6de8d0.tar.gz | |
[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.zsh')
| -rw-r--r-- | shell/key-bindings.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index 05110425..c04a0020 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -40,7 +40,7 @@ fi # CTRL-T - Paste the selected file path(s) into the command line __fsel() { - local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ + local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ -o -type f -print \ -o -type d -print \ -o -type l -print 2> /dev/null | cut -b3-"}" @@ -72,7 +72,7 @@ bindkey -M viins '^T' fzf-file-widget # ALT-C - cd into the selected directory fzf-cd-widget() { - local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ + local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ -o -type d -print 2> /dev/null | cut -b3-"}" setopt localoptions pipefail no_aliases 2> /dev/null local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --scheme=path --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-}" $(__fzfcmd) +m)" |
