IssueRaiser

"Lighter" and "cleaner" shell for `nix develop` and `nix shell`

## Proposal Final goal is to provide **better integration with other shell environments** - eg. zsh, fish, ... Depending how this will be implemented a very nice to have would be to not spawn a new process when entering shell environment. This would mean the current user shell environment would be updated *in-place* (like direnv does it). ## Reasoning For those who don't use bash using `nix-shell`, `nix develop` or `nix shell` usually means you need to run `nix-shell --run $SHELL` or creating an alias. I understand there are good reasons for using bash. Using bash ensures that development environments are very predictably and running commands from `nix-shell` would act as close as it can within a sandbox. But on the other side we are forcing developers to use bash or use workarounds. As all debates around editors also debates around shell environments are a *hot* topic among developers (which is our audience in this case). I wouldn't expect developers switching to bash just so they can use Nix. I would actually expect the opposite, potential users being turned away from Nix due to the lack of good integration with their shell environment. As with most of the UX decisions also this comes down to compromising one thing over the other. ## Bonus Another bonus to consider is also which environment variables we should expose inside the shell environments. From the perspective of a developer who just wants to enter a development environments to be able to develop their pro

Posted by garbas on Mar 6, 2021, 5:30 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

reliability (Other)

"Lighter" and "cleaner" shell for `nix develop` and `nix shell`

garbasMar 6, 2021, 5:30 PM

## Proposal Final goal is to provide **better integration with other shell environments** - eg. zsh, fish, ... Depending how this will be implemented a very nice to have would be to not spawn a new process when entering shell environment. This would mean the current user shell environment would be updated *in-place* (like direnv does it). ## Reasoning For those who don't use bash using `nix-shell`, `nix develop` or `nix shell` usually means you need to run `nix-shell --run $SHELL` or creating an alias. I understand there are good reasons for using bash. Using bash ensures that development environments are very predictably and running commands from `nix-shell` would act as close as it can within a sandbox. But on the other side we are forcing developers to use bash or use workarounds. As all debates around editors also debates around shell environments are a *hot* topic among developers (which is our audience in this case). I wouldn't expect developers switching to bash just so they can use Nix. I would actually expect the opposite, potential users being turned away from Nix due to the lack of good integration with their shell environment. As with most of the UX decisions also this comes down to compromising one thing over the other. ## Bonus Another bonus to consider is also which environment variables we should expose inside the shell environments. From the perspective of a developer who just wants to enter a development environments to be able to develop their pro

Comments (0)

No comments yet. Start the discussion.

Comment on this issue