From 608ec2b806a9b6cad95cab78f3e5b4f8b4b2b743 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 1 Apr 2014 21:24:13 +0900 Subject: set -o nonomatch for zsh (#34) Avoid error message in an empty directory --- install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install b/install index 6d006de6..e33cfbc2 100755 --- a/install +++ b/install @@ -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 } -- cgit v1.2.3