Skip to content

Commit

Permalink
Set SHELL variable while in nix-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
haslersn committed Sep 14, 2018
1 parent fd4db2d commit d7b6162
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/any-nix-shell-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"

0 comments on commit d7b6162

Please sign in to comment.