haslersn / any-nix-shell

fish and zsh support for the nix run and nix-shell environments of the Nix package manager
MIT License
253 stars 17 forks source link

Support `nix develop` #20

Closed 9999years closed 1 year ago

9999years commented 1 year ago

Closes #12

haslersn commented 1 year ago

Maybe we shouldn't set IN_NIX_RUN=1 when using nix develop. I think we should remove that environment variable once we entirely drop support for nix run.

haslersn commented 1 year ago

I think nix develop overrides $SHELL. Maybe we should set it by changing the command as follows:

--command env SHELL="$(which "$which_shell")" "$which_shell"
haslersn commented 1 year ago

Please also change the README. I think we can remove any mention of nix run in the README as it's solely supported for backwards compatibility. So you could probably just replace run by develop in the README.

9999years commented 1 year ago

I'll update the README but those other changes are out of scope here. Happy to explore them in a future issue/PR.

haslersn commented 1 year ago

For nix-shell we also set $SHELL, so that's not out of scope when supporting a new command.

9999years commented 1 year ago

OK, how's ac71bea70e3565e06286f8d20360ddf8ba4a59cc look?

9999years commented 1 year ago

I wrote nix-your-shell instead.