nox
nox copied to clipboard
Add command
I think it's gonna be a good idea to add smth like :q
in search or update (Packages to install: :q
) to quit. It's gonna be a litle more good behavior.
I was thinking that Ctrl-C would be enough, but yeah, sure, why not.
I think it would be nice to have a command that listed the results without ever prompting to install.
FWIW I've just completely removed the interactivity in the version I use: https://github.com/lheckemann/nox/commit/a02c71331580d835a92733dd0d96a728cca3f809
My opinion here:
#. It's always a good idea to have a way to quit normally, i.e. exit code 0, in particular, as nox prompts for confirmation this allows normal behavior if the user does not wish to install any found package (e.g. if it is not available but another similar one is).
#. There should be a way to tell nox to run non-interactively in search mode. This makes things like git bisect
nearly trivial as we can do git bisect run nox --non-interactive <search>
to find out when something broke. This would make identifying the exact cause of e.g. #64 near-trivial.
Whether the default should be interactive or not is another question...but as long as it can be toggled it doesn't matter very much to me.
https://github.com/lheckemann/nox/commit/07bbe389a3192f3da6c464e9c4164b953a0c9cae here's optional interactive mode. I won't be using it (way too much code for an IMHO useless feature) but maybe someone else wants it.
Based on lheckemann/nox@07bb38, I've added help texts for the options (calvertvl/nox@fd9edaf), and also added a quit command to the interactive mode (calvertvl/nox@53b5edf).
I probably would only use interactive mode if I'm trying to find and test a specific package, and even then I'm more likely to do something like this (if I don't add it to configuration.nix or install via nix-env -iA
):
$ nox some-package
<packages listed>
$ !! -i
nox some-package -i
<packages listed>
Packages to install: