diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2014-04-01 21:24:13 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2014-04-01 21:39:40 +0900 |
commit | 608ec2b806a9b6cad95cab78f3e5b4f8b4b2b743 (patch) | |
tree | c0c5a2f2cb24916c0d97fc029445037e607cd8f5 | |
parent | e5ae4f0ef6cf22bd308f73a0b5e6e7dddebb0abe (diff) |
set -o nonomatch for zsh (#34)
Avoid error message in an empty directory
-rwxr-xr-x | install | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -174,6 +174,7 @@ EOFZF # ------------ # CTRL-T - Paste the selected file path(s) into the command line __fsel() { + set -o nonomatch find * -path '*/\.*' -prune \ -o -type f -print \ -o -type d -print \ @@ -207,7 +208,7 @@ bindkey '^T' fzf-file-widget # ALT-C - cd into the selected directory fzf-cd-widget() { - cd "${$(find * -path '*/\.*' -prune \ + cd "${$(set -o nonomatch; find * -path '*/\.*' -prune \ -o -type d -print 2> /dev/null | fzf):-.}" zle reset-prompt } |