Mon Jun 3 07:04:57 PM CEST 2024
This commit is contained in:
parent
0bab358ce0
commit
3ca8234d9d
|
@ -29,13 +29,8 @@ function find_global() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -f $FZY_CACHE ]; then
|
if [ ! -f $FZY_CACHE ]; then
|
||||||
PATHS="$(git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME ls-files)"
|
PATHS=""
|
||||||
if [ "$file_type" = "d" ]; then
|
search_dirs=(~/.dotfiles/ ~/Workspace/ ~/Containers/ /home/server/Storage/Thomas/)
|
||||||
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/)
|
|
||||||
for i in "$search_dirs[@]"; do
|
for i in "$search_dirs[@]"; do
|
||||||
if [ -d $i ]; then
|
if [ -d $i ]; then
|
||||||
PATHS="$PATHS\n$i"
|
PATHS="$PATHS\n$i"
|
||||||
|
@ -62,7 +57,8 @@ function open_path() {
|
||||||
cd_to "$selection"
|
cd_to "$selection"
|
||||||
else
|
else
|
||||||
selection=$(realpath "$selection")
|
selection=$(realpath "$selection")
|
||||||
cd_to "$(dirname \"$selection\")"
|
parent=$(dirname "$selection")
|
||||||
|
cd_to "$parent"
|
||||||
nvim "$selection"
|
nvim "$selection"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue