From 107d7b8ea3ac03b540c2b7f54374ffea1bd09fee Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Wed, 13 Mar 2024 01:47:04 +0800 Subject: [PATCH] fixup! darwin/core: simplify fish shell $PATH workaround --- darwin/profiles/common/core/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/darwin/profiles/common/core/default.nix b/darwin/profiles/common/core/default.nix index 3bb0202..4b0def5 100644 --- a/darwin/profiles/common/core/default.nix +++ b/darwin/profiles/common/core/default.nix @@ -42,8 +42,9 @@ # WORKAROUND: Fix $PATH orders when using Fish shell # https://github.com/LnL7/nix-darwin/issues/122#issuecomment-1659465635 programs.fish.loginShellInit = let - # ["$HOME/.local" "/usr/local"] -> "'$HOME/.local/bin' '/usr/local/bin'" - makePath = path: lib.concatMapStringsSep " " (path: lib.escapeShellArg "${path}/bin") path; + # Double quotes instead of single quotes are necessary + # ["$HOME/.local" "/usr/local"] -> "\"$HOME/.local/bin' '/usr/local/bin\"" + makePath = path: lib.concatMapStringsSep " " (path: "\"${path}/bin\"") path; in '' fish_add_path --move --prepend --path ${makePath config.environment.profiles} set fish_user_paths $fish_user_paths