From e3abbe810c5608ea502ae47a77b18c5b30dddfef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Wed, 24 Apr 2024 14:27:44 +0200 Subject: [PATCH] Append last selection to top of fzy cache --- .config/zsh/.zshrc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 967e337..5c2a21e 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -77,13 +77,14 @@ function find_global() { search_dirs=(~/Workspace/ ~/Containers/ /home/server/Storage/Thomas/) for i in "$search_dirs[@]"; do if [ -d $i ]; then - PATHS="$PATHS$i\n" - PATHS+="$(fd . $i -t $file_type -d 8)" + PATHS="$PATHS\n$i" + PATHS+="\n$(fd . $i -t $file_type -d 8)" fi done echo -e "$PATHS" > $FZY_CACHE fi file="$(cat $FZY_CACHE | fzy -l 20)" + echo $file | cat - $FZY_CACHE | awk '!x[$0]++' > /tmp/fzy_paths_$file_type && mv /tmp/fzy_paths_$file_type $FZY_CACHE echo $file } @@ -246,7 +247,7 @@ export ARCHFLAGS="-arch x86_64" export SSH_KEY_PATH="~/.ssh/rsa_id" export PYTHONDONTWRITEBYTECODE=1 export TERM="screen-256color" -export PATH=$HOME/.local/bin:$PATH +export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$PATH export GOPATH=/tmp/go if command -v micromamba &> /dev/null; then @@ -309,6 +310,7 @@ alias mallorea="run_waypipe mallorea" alias vault="run_waypipe vault" alias riva="run_waypipe riva" alias kell="run_waypipe kell" +alias aloria="run_waypipe aloria" alias ls="ls --color=auto" alias gdb='gdb -q'