cli: paginate help
This does not respect "--no-pager", support will be added in the next
commit.
@@ -1502,6 +1502,13 @@ pub fn handle_command_result(ui: &mut Ui, result: Result<(), CommandError>) -> i
inner.render().to_string()
};
+ match inner.kind() {
+ clap::error::ErrorKind::DisplayHelp
+ | clap::error::ErrorKind::DisplayHelpOnMissingArgumentOrSubcommand => {
+ ui.request_pager()
+ }
+ _ => {}
+ };
// Definitions for exit codes and streams come from
// https://github.com/clap-rs/clap/blob/master/src/error/mod.rs
match inner.kind() {
