MercuryTechnologies / nix-your-shell

A `nix` and `nix-shell` wrapper for shells other than `bash`
MIT License
85 stars 12 forks source link

[DUX-1066] Fix `--command` with `nix develop` #21

Closed 9999years closed 1 year ago

9999years commented 1 year ago

The Nix CLI is inconsistent with the --command flag...

We would transform (e.g.) nix develop -L .#ghc942 into nix develop --command fish -L .#ghc942, which Nix interprets as running the command fish -L .#ghc942 in the shell. This patch puts the --command fish bit at the end, instead of at the front, so the -L .#ghc942 arguments are correctly passed to nix develop.

Future work: actually writing some tests lol

github-actions[bot] commented 1 year ago

A PR to release these changes has been created, bumping the version from 1.1.0 to 1.1.1.

linear[bot] commented 1 year ago
DUX-1066 Allow passing arguments to `nix develop` in `nix-your-shell`

> We would transform (e.g.) `nix develop -L .#ghc942` into `nix develop --command fish -L .#ghc942`, which Nix interprets as running the command `fish -L .#ghc942` in the shell. This patch puts the `--command fish` bit at the end, instead of at the front, so the `-L .#ghc942` arguments are correctly passed to `nix develop`.