1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2025-02-05 07:43:22 -08:00

fix detecting fzy in dirview

This commit is contained in:
Connor Olding 2021-10-18 17:34:36 -07:00
parent 66fc590e90
commit b04c717608

View file

@ -71,8 +71,6 @@ preload=dummy
. ~/.sh . ~/.sh
unset preload unset preload
local fuzzy=`has fzy || print`
dirprev() { ### @- dirprev() { ### @-
### rotate and change to the previous directory in the directory stack ### rotate and change to the previous directory in the directory stack
### without consuming the prompt. ### without consuming the prompt.
@ -97,6 +95,7 @@ dirup() { ### @-
dirview() { ### @- dirview() { ### @-
### use a fuzzy finder to select a recent directory in the directory stack ### use a fuzzy finder to select a recent directory in the directory stack
### and change to it without consuming the prompt. ### and change to it without consuming the prompt.
local fuzzy="$(has fzy || print)"
print print
if [ -n "$fuzzy" ]; then if [ -n "$fuzzy" ]; then
local d="$(dirs -pl | awk '!seen[$0]++' | "$fuzzy")" local d="$(dirs -pl | awk '!seen[$0]++' | "$fuzzy")"