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/aliases.sh | 5 ++--- config/essentials/shell/functions.sh | 7 +++++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'config/essentials/shell') diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index fab3a06..239dc47 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -3,8 +3,7 @@ # The most important one alias vi='nvim' -which z >/dev/null 2>&1 && - alias cd='z' +which zoxide > /dev/null 2>&1 && alias cd='z' # Zsh specific aliases if [ $SHELL = "/bin/zsh" ]; then @@ -249,7 +248,7 @@ alias cdoc='cd ~/docs' alias czk='cd ~/docs/zk' alias cda='cd ~/docs/android/projects' alias csv='cd ~/docs/school/Vakken' -alias cdpj='cd ~/docs/school/Vakken/ITProj' +alias cdpj='cd ~/proj' alias cdm='cd ~/music' alias cdp='cd ~/pics' alias cdpa='cd ~/pics/ai-outputs/' 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