Skip to content
Snippets Groups Projects
Commit 608ec2b8 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

set -o nonomatch for zsh (#34)

Avoid error message in an empty directory
parent e5ae4f0e
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment