Append last selection to top of fzy cache

This commit is contained in:
Thomas Avé 2024-04-24 14:27:44 +02:00
parent f8b3a4979e
commit e3abbe810c
1 changed files with 5 additions and 3 deletions

View File

@ -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'