From f0fafea246dbecaf2cd80fc191f422215cf729f8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 22 Sep 2024 20:18:40 +0200 Subject: checkpoint --- config/essentials/shell/functions.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config/essentials/shell/functions.sh') diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 9e12715..cf10365 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -341,3 +341,10 @@ ffconcat () { rm $tmp } nvim_bindings() { "$(tmp="$(mktemp)"; nvim +":set nomore | :redir! > $tmp | :map | :redir END | :q" ; fzf < "$tmp"; rm "$tmp")"; } + +prj () { + pfx="$HOME/proj" + d="$(find "$pfx" -mindepth 1 -maxdepth 1 -type d | sed "s@$pfx@@" |fzf)" + [ -d "$d" ] || exit 1 + cd "$pfx"/"$d" +} -- cgit v1.2.3