Add check whether ~/Containers exists
This commit is contained in:
parent
8a5df9ee7f
commit
fe95457735
|
@ -90,7 +90,12 @@ function zvm_after_init() {
|
|||
# Use FZY instead of FZF for ctrl-t
|
||||
function find_files() {
|
||||
zle -I
|
||||
BUFFER=cd "$(fd -H . ~/Workspace ~/Containers -t d | fzy -l 20)"
|
||||
# Check if ~/Containers exists
|
||||
if [ -d ~/Containers ]; then
|
||||
BUFFER=cd "$(fd -H . ~/Workspace ~/Containers -t d | fzy -l 20)"
|
||||
else
|
||||
BUFFER=cd "$(fd -H . ~/Workspace -t d | fzy -l 20)"
|
||||
fi
|
||||
zle accept-line
|
||||
clear
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue