From bc97060419c4f70bd88f4b91eab82e0bb09e11c8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 7 Oct 2024 23:03:26 +0200 Subject: checkpoint --- config/essentials/shell/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/essentials/shell/functions.sh') 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" -- cgit v1.2.3