From 2cfd342176a305aec7c265eb5c02ef40eb37ffe4 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Sat, 3 Feb 2024 04:09:14 +0300 Subject: [PATCH] Nix : Rename nix_shell var to resolve possible name collision. --- .config/bash/module/Nix.sh | 4 ++-- .config/bash/module/Ps1.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/bash/module/Nix.sh b/.config/bash/module/Nix.sh index d84f51b..cf90f13 100644 --- a/.config/bash/module/Nix.sh +++ b/.config/bash/module/Nix.sh @@ -82,7 +82,7 @@ function nix_shell() { local name="${1,,}" [[ "${name}" = "" ]] && name="main" - nix_shell="${name}" nix-shell ~/.config/linux/shell/"${name^}".nix + NIX_SHELL="${name}" nix-shell ~/.config/linux/shell/"${name^}".nix } alias shell="nix_shell" @@ -102,7 +102,7 @@ function nix_tmpshell() { pkgs+=("nixpkgs#${pkg}") done - nix_shell="${1}" nix shell ${pkgs[@]} + NIX_SHELL="${1}" nix shell ${pkgs[@]} } alias tmpshell="nix_tmpshell" diff --git a/.config/bash/module/Ps1.sh b/.config/bash/module/Ps1.sh index cd0a303..e9ce6cb 100644 --- a/.config/bash/module/Ps1.sh +++ b/.config/bash/module/Ps1.sh @@ -73,8 +73,8 @@ function __prompt_command() { PS1+="\[${color_default}\]" # Show nix shell name. - if [ -n "${nix_shell}" ]; then - PS1+="${color_white}${nix_shell}${color_default} " + if [ -n "${NIX_SHELL}" ]; then + PS1+="${color_white}${NIX_SHELL}${color_default} " fi # Show remote connections.