Mon Jun 3 07:04:57 PM CEST 2024

This commit is contained in:
Thomas Avé 2024-06-03 19:04:57 +02:00
parent 0bab358ce0
commit 3ca8234d9d
1 changed files with 4 additions and 8 deletions

View File

@ -29,13 +29,8 @@ function find_global() {
fi
fi
if [ ! -f $FZY_CACHE ]; then
PATHS="$(git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME ls-files)"
if [ "$file_type" = "d" ]; then
PATHS="$(echo -e $PATHS | xargs -n 1 dirname | uniq | grep -v '^\.$' | parallel echo ~/{})"
else
PATHS="$(echo -e $PATHS | parallel echo ~/{})"
fi
search_dirs=(~/Workspace/ ~/Containers/ /home/server/Storage/Thomas/)
PATHS=""
search_dirs=(~/.dotfiles/ ~/Workspace/ ~/Containers/ /home/server/Storage/Thomas/)
for i in "$search_dirs[@]"; do
if [ -d $i ]; then
PATHS="$PATHS\n$i"
@ -62,7 +57,8 @@ function open_path() {
cd_to "$selection"
else
selection=$(realpath "$selection")
cd_to "$(dirname \"$selection\")"
parent=$(dirname "$selection")
cd_to "$parent"
nvim "$selection"
fi
else