Closed zveinn closed 9 months ago
Term pager was implemented to provide a way to scroll through the help such as mc cp --help
which can get lengthier.
What we can do is disable this pager on dumb terminals such as TERM= values that are not xterm
or xterm-256color
Term pager was implemented to provide a way to scroll through the help such as mc cp --help which can get lengthier. What we can do is disable this pager on dumb terminals such as TERM= values that are not xterm or xterm-256color
Agree, it is better to fix users issues rather than completely remove the term pager.
That's not really a solution either.. Changing the term value to disable this paging functionality breaks a whole lot of other things. Sure, the TERM env is reset when you open a new terminal but it's reaaalllyyy annoying.
Maybe we can add a --scrollable flag ? I kind of feel like having it scrollable should be a feature and not default behavior.
no, it is kind of inspired by this aws s3 help
, and also like git commit --help
- it is not very unusual.
Why? Because mc
commands are self-documented, we kind of have to show them in some scrollable manner by default; otherwise, the entire help goes away from terminal screens, it's painful to read all that text when we can't read it like a page.
Just like other tools do as shown above ^^.
hmm.. then maybe make a flag to disable the pager and disable it automatically for terminal that are not xterm or xterm-256color
Created a new PR for this: https://github.com/minio/mc/pull/4819
The problem here is that when you run the --help it won't exit back to the terminal. We've had some complaints about this. The code removed is trying to adjust to random screen sizes but we should probably just be printing to stdout.