From d7b616235faa63dbb5d2250c58718f46fe19a24d Mon Sep 17 00:00:00 2001 From: haslersn Date: Fri, 14 Sep 2018 12:44:29 +0200 Subject: [PATCH] Set SHELL variable while in nix-shell --- bin/any-nix-shell-wrapper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/any-nix-shell-wrapper b/bin/any-nix-shell-wrapper index 6944eb9..f98ad28 100755 --- a/bin/any-nix-shell-wrapper +++ b/bin/any-nix-shell-wrapper @@ -20,6 +20,7 @@ fns () { if [[ -n $name ]] && [[ $name != shell ]]; then pkgs+=" "$name fi - env ANY_NIX_SHELL_PKGS="$pkgs" nix-shell "$@" --command "$which_shell" + env ANY_NIX_SHELL_PKGS="$pkgs" nix-shell "$@" \ + --command "export SHELL=\"$(which $which_shell)\"; $which_shell" } fns "$@" \ No newline at end of file