New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search.cc: improve UX for nix search
#2158
Conversation
Please keep in mind that this is quite opinionated as I'd like to improve the UX for |
👍 on using the pager (in fact it should be enabled for all However I'm not sure if hiding most of the package information is a good idea. I also don't know if it's actually a UX improvement to make the user guess what the meaning of the output columns is. |
First of all, thanks a lot for your feedback!
you might be right. The main reason why I filed this patch was because I think that the current In the end we could simply drop the |
@edolstra before I continue working on this patch, are you happy with the Furthermore I'd be happy to discuss about the verbose output (which I'd really love to see improved) %) |
Agreed that the current output is far too verbose. I tend to avoid using |
That looks pretty okay to me, except that I'd prefer swapping the attribute name and package/version name, since we're de-emphasizing the latter. (I.e. it should be |
@edolstra you're right, fixed it. |
@edolstra any chance to get this merged or is something else missing? |
The only remaining problem is that it overloads the meaning of Does anybody have a suggestion for an alternative flag name? |
You're absolutely right, I've just seen that Nix supports
Something like But as you stated previously do you think we should keep such a flag or would it be better to print the enhanced output (as shown in the screenshot above) by default? When I filed this patch I thought that it might be more convenient to have a minimalistic output by default (which is why I (ab)used |
As proposed in NixOS#1634 the `nix search` command could use some improvements. Initially 0413aeb added some basic sorting behavior using `std::map`, a next step would be an improvement of the output. This patch includes the following changes: * Use `$PAGER` for outputs with `RunPager` from `shared.hh`: The same behavior is defined for `nix-env --query`, furthermore it makes searching huge results way easier. * Simplified result blocks: The new output is heavily inspired by the output from `nox`, the first line shows the attribute path and the derivaiton name (`attribute path (derivation name)`) and the description in the second line.
@edolstra I dropped the |
Thanks! |
As proposed in #1634 the
nix search
command could use someimprovements. Initially 0413aeb added
some basic sorting behavior using
std::map
, a next step would be animprovement of the output.
This patch includes the following changes:
Use
$PAGER
for outputs withRunPager
fromshared.hh
:The same behavior is defined for
nix-env --query
, furthermore itmakes searching huge results way easier.
Simplified result blocks:
The new output is heavily inspired by the output from
nox
, the firstline shows the attribute path and the derivaiton name
(
attribute path (derivation name)
) and the description in the secondline.