summaryrefslogtreecommitdiff
path: root/config/essentials/shell/functions.sh
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-07 23:03:26 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-07 23:03:26 +0200
commitbc97060419c4f70bd88f4b91eab82e0bb09e11c8 (patch)
tree942236a4bdcb59db209b5fcb54e57c99480bd9cb /config/essentials/shell/functions.sh
parent1e755f4db73f1dc9671986c1b5f833eaab21fdc6 (diff)
checkpoint
Diffstat (limited to 'config/essentials/shell/functions.sh')
-rw-r--r--config/essentials/shell/functions.sh4
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"