From 24b80c45f2d5cfd4e8ea7f3a6b04de3e2dfc04c4 Mon Sep 17 00:00:00 2001 From: Colin Hooper Date: Fri, 22 May 2026 15:28:21 +0100 Subject: [PATCH] nixos/starship: fix '$' escaping for bash and zsh --- nixos/modules/programs/starship.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/starship.nix b/nixos/modules/programs/starship.nix index 849c91b12ed3..b23471d2529f 100644 --- a/nixos/modules/programs/starship.nix +++ b/nixos/modules/programs/starship.nix @@ -116,7 +116,7 @@ in # config file. starship appears to use a hardcoded config location # rather than one inside an XDG folder: # https://github.com/starship/starship/blob/686bda1706e5b409129e6694639477a0f8a3f01b/src/configure.rs#L651 - if [[ ! -f "$${STARSHIP_CONFIG:-$HOME/.config/starship.toml}" ]]; then + if [[ ! -f "''${STARSHIP_CONFIG:-$HOME/.config/starship.toml}" ]]; then export STARSHIP_CONFIG=${settingsFile} fi eval "$(${cfg.package}/bin/starship init bash --print-full-init)" @@ -154,7 +154,7 @@ in # config file. starship appears to use a hardcoded config location # rather than one inside an XDG folder: # https://github.com/starship/starship/blob/686bda1706e5b409129e6694639477a0f8a3f01b/src/configure.rs#L651 - if [[ ! -f "$${STARSHIP_CONFIG:-$HOME/.config/starship.toml}" ]]; then + if [[ ! -f "''${STARSHIP_CONFIG:-$HOME/.config/starship.toml}" ]]; then export STARSHIP_CONFIG=${settingsFile} fi eval "$(${cfg.package}/bin/starship init zsh)"