diff --git a/nix-shell.plugin.zsh b/nix-shell.plugin.zsh index 7277379..fde2999 100644 --- a/nix-shell.plugin.zsh +++ b/nix-shell.plugin.zsh @@ -29,7 +29,7 @@ function nix-shell() { then PURE=1 - # skip all other unary arguments + # skip all other unary arguments elif [[ $key == "-"* ]] then IN_PACKAGES=0 @@ -52,7 +52,7 @@ function nix-shell() { else NIX_SHELL_PACKAGES="$NIX_SHELL_PACKAGES" \ NIX_BUILD_SHELL="$NIX_SHELL_PLUGIN_DIR/scripts/buildShellShim.zsh" \ + NIX_EXECUTING_SHELL="$SHELL" \ command nix-shell "$@" fi } - diff --git a/scripts/buildShellShim.zsh b/scripts/buildShellShim.zsh index 702b53a..5d0a32c 100755 --- a/scripts/buildShellShim.zsh +++ b/scripts/buildShellShim.zsh @@ -6,7 +6,7 @@ if [ "$1" = "--rcfile" ]; then shift tmp="$(cat $1)" echo ${tmp%exit} > $1 - echo "zsh" >> $1 + echo $NIX_EXECUTING_SHELL >> $1 bash $1 else bash "$@"