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

Unload option? #9

Closed KenMacD closed 1 year ago

KenMacD commented 3 years ago

Is there any way to 'undo' these changes in a shell.nix? If not could there be?

I know I could just unload the nix-shell function or pass --command, the problem is that I'm using direnv which starts the shell automatically. Occasionally I'd rather have a shell.nix using bash. It'd be nice if there was something I could include in the shell definition that would run bash.

haslersn commented 1 year ago

There are workarounds to skip any-nix-shell:

direnv can probably be instructed to use the latter workaround by putting the following in .envrc:

use nix --command return

Though I didn't test this.