Nix : Rename nix_shell var to resolve possible name collision.
This commit is contained in:
parent
51eb7a6092
commit
2cfd342176
|
@ -82,7 +82,7 @@ function nix_shell() {
|
||||||
local name="${1,,}"
|
local name="${1,,}"
|
||||||
[[ "${name}" = "" ]] && name="main"
|
[[ "${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"
|
alias shell="nix_shell"
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ function nix_tmpshell() {
|
||||||
pkgs+=("nixpkgs#${pkg}")
|
pkgs+=("nixpkgs#${pkg}")
|
||||||
done
|
done
|
||||||
|
|
||||||
nix_shell="${1}" nix shell ${pkgs[@]}
|
NIX_SHELL="${1}" nix shell ${pkgs[@]}
|
||||||
}
|
}
|
||||||
alias tmpshell="nix_tmpshell"
|
alias tmpshell="nix_tmpshell"
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,8 @@ function __prompt_command() {
|
||||||
PS1+="\[${color_default}\]"
|
PS1+="\[${color_default}\]"
|
||||||
|
|
||||||
# Show nix shell name.
|
# Show nix shell name.
|
||||||
if [ -n "${nix_shell}" ]; then
|
if [ -n "${NIX_SHELL}" ]; then
|
||||||
PS1+="${color_white}${nix_shell}${color_default} "
|
PS1+="${color_white}${NIX_SHELL}${color_default} "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Show remote connections.
|
# Show remote connections.
|
||||||
|
|
Reference in a new issue