-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Redirect some Nix commands output to a pager #4972
base: master
Are you sure you want to change the base?
Conversation
So the reason I didn't enable paging yet is that it can interact badly with the progress indicator. Maybe what we should do is show the progress indicator until the first output is written, then disable the progress indicator and start the pager. |
I’ve actually disabled the progress indicator altogether when using the pager (here). But waiting for the first output might be nicer (I’ve no idea how to do that though :) ). |
Ideally we would use |
bda8bef
to
8ad1ed5
Compare
8ad1ed5
to
f74f98f
Compare
src/nix/flake.cc.orig
Outdated
@@ -0,0 +1,1180 @@ | |||
#include "command.hh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You included the file by accident, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops, yes. Thanks, fixed
Does less -R support the progress bar? |
f74f98f
to
e0423e7
Compare
|
e0423e7
to
edbdad2
Compare
Make `nix search`, `nix flake show` and `nix flake metadata` pipe their output into a pager to make their result easier to visualise.
The `bar` logger sents a bunch of things to stderr that messes-up the pager output
Rewrite the pager mechanism to make it a (parametrized) instance of `Logger` rather than being a standalone thing. The main interest of this is that we have more control over when to actually start it and make the inner pager more quiet (only when `writeToStdout` is called)
edbdad2
to
52a4ccc
Compare
@edolstra friendly ping :) |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-08-04-nix-team-meeting-minutes-77/31487/1 |
Make
nix search
,nix flake show
andnix flake metadata
pipe theiroutput into a pager to make their result easier to visualise.
Fix #4548