Skip to content

Commit

Permalink
use /proc/$$/exe instead of $SHELL to detect current shell
Browse files Browse the repository at this point in the history
  • Loading branch information
chisui committed Apr 7, 2023
1 parent af6f8a2 commit 1834762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nix-shell.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function nix-shell() {
else
NIX_SHELL_PACKAGES="$NIX_SHELL_PACKAGES" \
NIX_BUILD_SHELL="$NIX_SHELL_PLUGIN_DIR/scripts/buildShellShim" \
NIX_EXECUTING_SHELL="$SHELL" \
NIX_EXECUTING_SHELL=$(readlink /proc/$$/exe) \
command nix-shell "$@"
fi
}

0 comments on commit 1834762

Please sign in to comment.