diff options
Diffstat (limited to 'config/essentials/shell/functions.sh')
-rw-r--r-- | config/essentials/shell/functions.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 0f12206..030778f 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -350,13 +350,13 @@ nvim_bindings() { prj() { pfx="$HOME/proj" d="$(find "$pfx" -mindepth 1 -maxdepth 1 -type d | sed "s@$pfx/@@" |fzf)" - [ -d "$pfx/$d" ] || return 1 + { [ "$d" ] && [ -d "$pfx/$d" ]; } || return 1 cd "$pfx/$d" } prje() { prj || return 1 f="$(git ls-files | fzf)" - [ "$f" ] || exit 1 + [ "$f" ] || return 1 if [ -f "$f" ] then "$EDITOR" "$f" |