sauce icon indicating copy to clipboard operation
sauce copied to clipboard

Support for nushell

Open TheDan64 opened this issue 5 years ago • 2 comments

https://github.com/nushell/nushell

nushell might be too young / not have all the required features yet. Not sure. But it would be a great shell target

TheDan64 avatar Jan 28 '21 03:01 TheDan64

Huh, nushell supports directory based envvars?: https://www.nushell.sh/blog/2020-06-09-nushell_0_15_0.html#per-directory-environment-variables-samhedin Can't seem to find this in the latest version tho

https://www.nushell.sh/book/environment.html

TheDan64 avatar Jan 28 '21 03:01 TheDan64

Support for nushell seems like it's blocked on a number of things:

  • They don't have eval (or their source command isn't yet flexible enough): https://github.com/nushell/nushell/issues/2812

    This is pretty much required in order for any non-baked-in nushell command to emit shell compatible source (afaik). Evidenced by direnv hook zsh, startship init zsh, etc.

  • They don't support anything like precmd, or chpwd hooks a la zsh/bash/etc. only required for --autoload but still.

  • Their plugin system seems like it's only useful (at my brief glance) for authoring commands (through which you pipe data), not so much actual plugins that augment the shell's general behavior.

I think that's it. Their method of exporting env vars is kind of odd, but for this tool might actually be convenient in that you could atomically bulk-insert them in one go, which is kind of neat.

On the subject of dir-based env vars. That feature, pretty much mimics direnv + dotenv or i guess maybe direnv by itself. So if you were happy with that, then that's enough to maybe not opt to use sauce. But at that point it's pretty much a redirect to https://github.com/DanCardin/sauce#direnv, sauce is just more directly tailored to what it does than direnv is (which pretty much just executes the your raw shell code for you, so you'd have to implement in shell, everything else that sauce does.

DanCardin avatar Jan 28 '21 19:01 DanCardin