nox icon indicating copy to clipboard operation
nox copied to clipboard

Add command

Open jagajaga opened this issue 9 years ago • 6 comments

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.

jagajaga avatar Nov 03 '14 19:11 jagajaga

I was thinking that Ctrl-C would be enough, but yeah, sure, why not.

madjar avatar Nov 04 '14 08:11 madjar

I think it would be nice to have a command that listed the results without ever prompting to install.

noctuid avatar Apr 30 '16 21:04 noctuid

FWIW I've just completely removed the interactivity in the version I use: https://github.com/lheckemann/nox/commit/a02c71331580d835a92733dd0d96a728cca3f809

lheckemann avatar May 10 '17 09:05 lheckemann

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.

calvertvl avatar Jun 18 '17 01:06 calvertvl

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.

lheckemann avatar Jun 18 '17 09:06 lheckemann

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: 

calvertvl avatar Jun 18 '17 14:06 calvertvl