From 6d8c88758a8968ca3fa47b395039420bfbeb5fbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Av=C3=A9?= <email@thomasave.be>
Date: Fri, 14 Jun 2024 22:10:48 +0200
Subject: [PATCH] Fri Jun 14 10:10:48 PM CEST 2024

---
 home/Mallorea.nix       | 2 +-
 home/Vault.nix          | 2 +-
 home/zsh/default.nix    | 2 +-
 home/zsh/files/keys.zsh | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/home/Mallorea.nix b/home/Mallorea.nix
index db9dedf..443d149 100644
--- a/home/Mallorea.nix
+++ b/home/Mallorea.nix
@@ -73,7 +73,7 @@ in
     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)
       REMOTE_SEARCH_DIRS=()
   '';
diff --git a/home/Vault.nix b/home/Vault.nix
index 12563f1..34dd93b 100644
--- a/home/Vault.nix
+++ b/home/Vault.nix
@@ -71,7 +71,7 @@ in
     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/)
       REMOTE_SEARCH_DIRS=()
   '';
diff --git a/home/zsh/default.nix b/home/zsh/default.nix
index 83fa458..1b33d38 100644
--- a/home/zsh/default.nix
+++ b/home/zsh/default.nix
@@ -44,7 +44,7 @@
     syntaxHighlighting.enable = false;
     autosuggestion.enable = true;
 
-    initExtra = pkgs.lib.mkDefault ''
+    initExtra = ''
       LOCAL_SEARCH_DIRS=(~/.dotfiles/)
       REMOTE_SEARCH_DIRS=(~/Workspace/ /home/server/Storage/Shared/ /home/server/Storage/Thomas/)
     '';
diff --git a/home/zsh/files/keys.zsh b/home/zsh/files/keys.zsh
index 70a1356..528c357 100644
--- a/home/zsh/files/keys.zsh
+++ b/home/zsh/files/keys.zsh
@@ -34,10 +34,10 @@ function find_global() {
         done
         for i in "$REMOTE_SEARCH_DIRS[@]"; do
             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
         done
-        echo -e "$PATHS" > $FZY_CACHE
+        echo "$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