Fri Jun 14 10:10:48 PM CEST 2024

This commit is contained in:
Thomas Avé 2024-06-14 22:10:48 +02:00
parent dc66e8847f
commit 6d8c88758a
4 changed files with 5 additions and 5 deletions

View File

@ -73,7 +73,7 @@ in
XDG_RUNTIME_DIR = "/run/user/$(id -u)"; XDG_RUNTIME_DIR = "/run/user/$(id -u)";
}; };
programs.zsh.initExtra = '' programs.zsh.initExtra = pkgs.lib.mkForce ''
LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Containers ~/Workspace ~/Storage/Thomas ~/Storage/Shared) LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Containers ~/Workspace ~/Storage/Thomas ~/Storage/Shared)
REMOTE_SEARCH_DIRS=() REMOTE_SEARCH_DIRS=()
''; '';

View File

@ -71,7 +71,7 @@ in
XDG_RUNTIME_DIR = "/run/user/$(id -u)"; XDG_RUNTIME_DIR = "/run/user/$(id -u)";
}; };
programs.zsh.initExtra = '' programs.zsh.initExtra = pkgs.lib.mkForce ''
LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Storage/Thomas/ ~/Storage/Etienne/ ~/Storage/Magda\ and\ Etienne/ ~/Containers/) LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Storage/Thomas/ ~/Storage/Etienne/ ~/Storage/Magda\ and\ Etienne/ ~/Containers/)
REMOTE_SEARCH_DIRS=() REMOTE_SEARCH_DIRS=()
''; '';

View File

@ -44,7 +44,7 @@
syntaxHighlighting.enable = false; syntaxHighlighting.enable = false;
autosuggestion.enable = true; autosuggestion.enable = true;
initExtra = pkgs.lib.mkDefault '' initExtra = ''
LOCAL_SEARCH_DIRS=(~/.dotfiles/) LOCAL_SEARCH_DIRS=(~/.dotfiles/)
REMOTE_SEARCH_DIRS=(~/Workspace/ /home/server/Storage/Shared/ /home/server/Storage/Thomas/) REMOTE_SEARCH_DIRS=(~/Workspace/ /home/server/Storage/Shared/ /home/server/Storage/Thomas/)
''; '';

View File

@ -34,10 +34,10 @@ function find_global() {
done done
for i in "$REMOTE_SEARCH_DIRS[@]"; do for i in "$REMOTE_SEARCH_DIRS[@]"; do
if [ -d $i ]; then if [ -d $i ]; then
PATHS="$PATHS\n$i\n$(ssh mallorea fd . $i -t $file_type -d 8)" PATHS="$PATHS\n$i\n$(ssh mallorea fd . \"$i\" -t $file_type -d 8)"
fi fi
done done
echo -e "$PATHS" > $FZY_CACHE echo "$PATHS" > $FZY_CACHE
fi fi
file="$(cat $FZY_CACHE | fzy -l 20)" 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" | cat - $FZY_CACHE | awk '!x[$0]++' > /tmp/fzy_paths_$file_type && mv /tmp/fzy_paths_$file_type $FZY_CACHE