fish-shell/src
Johannes Altmanninger 61486954bc Use a pager to view long outputs of builtin --help
Every builtin or function shipped with fish supports flag -h or --help to
print a slightly condensed version of its manpage.
Some of those help messages are longer than a typical screen;
this commit pipes the help to a pager to make it easier to read.

As in other places in fish we assume that either $PAGER or "less" is a
valid pager and use that.

In three places (error messages for bg, break and continue) the help is
printed to stderr instead of stdout.  To make sure the error message is
visible in the pager, we pass it to builtin_print_help, every call of which
needs to be updated.

Fixes #6227
2019-10-28 18:36:07 +01:00
..
widecharwidth Update widechar_width 2019-05-14 09:49:51 +02:00
autoload.cpp Initialize a const variable 2019-08-16 17:50:41 -07:00
autoload.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin.h Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_argparse.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_argparse.h
builtin_bg.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_bg.h
builtin_bind.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_bind.h Allow binding nul (zero byte) 2019-09-14 16:37:57 -07:00
builtin_block.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_block.h
builtin_builtin.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_builtin.h
builtin_cd.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_cd.h
builtin_command.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_command.h
builtin_commandline.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_commandline.h Reformat all files 2019-05-05 12:09:25 +02:00
builtin_complete.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_complete.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_contains.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_contains.h
builtin_disown.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_disown.h
builtin_echo.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_echo.h
builtin_emit.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_emit.h
builtin_eval.cpp Remove some unused variables 2019-05-12 18:23:00 -07:00
builtin_eval.h Re-implement eval as a regular builtin 2019-04-12 07:04:15 -05:00
builtin_exit.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_exit.h
builtin_fg.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_fg.h
builtin_function.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_function.h
builtin_functions.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_functions.h
builtin_history.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_history.h
builtin_jobs.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_jobs.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_math.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_math.h
builtin_printf.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_printf.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_pwd.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_pwd.h
builtin_random.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_random.h
builtin_read.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_read.h
builtin_realpath.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_realpath.h
builtin_return.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_return.h
builtin_set.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_set.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_set_color.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_set_color.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_source.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_source.h
builtin_status.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_status.h
builtin_string.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_string.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_test.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_test.h
builtin_ulimit.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_ulimit.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_wait.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_wait.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
color.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
color.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
common.cpp sucess -> success, failiure -> failure 2019-10-18 18:36:03 -07:00
common.h Revert "Escape separators (colon and equals) to improve completion" 2019-09-19 14:38:16 +08:00
complete.cpp Completion: complete argument to last of a group of short options 2019-10-16 11:30:50 +02:00
complete.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
enum_set.h Clean up enum_set.h header 2019-04-26 16:08:19 -07:00
env.cpp Do not import vars that are equivalent to a universal exported var 2019-10-19 12:41:57 +02:00
env.h Provide an optimized override of get_pwd_slash() 2019-06-10 10:26:33 -07:00
env_dispatch.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
env_dispatch.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
env_universal_common.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
env_universal_common.h Do not import vars that are equivalent to a universal exported var 2019-10-19 12:41:57 +02:00
event.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
event.h Make events per-parser 2019-06-03 02:48:35 -07:00
exec.cpp Remove job_flags as an enum, just use a struct 2019-10-15 14:40:58 -07:00
exec.h Migrate the global exec_count into the parser 2019-05-04 20:58:35 -07:00
expand.cpp expand: Remove unused includes 2019-10-19 14:20:53 +02:00
expand.h Unexpand abbreviations' variable names before completing them 2019-10-06 14:42:42 +02:00
fallback.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
fallback.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
fish.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
fish_indent.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
fish_key_reader.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
fish_test_helper.cpp Clean up some tokenization 2019-10-13 16:06:16 -07:00
fish_tests.cpp Correctly highlight input following a tokenizer error 2019-10-27 16:08:49 -07:00
fish_version.cpp Reformat all files 2019-05-05 12:09:25 +02:00
fish_version.h
flog.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
flog.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
function.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
function.h Remove the process from function_block_t 2019-05-18 21:09:04 -07:00
future_feature_flags.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
future_feature_flags.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
global_safety.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
highlight.cpp Clean up and unify pipes and redirections 2019-10-15 11:26:41 -07:00
highlight.h fix typos 2019-10-23 19:38:44 +02:00
history.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
history.h Use move semantics in trim and history_item_t 2019-08-25 13:37:06 -07:00
history_file.cpp fix typos 2019-10-23 19:38:44 +02:00
history_file.h Include ctime in history_file.h 2019-10-16 11:55:40 -07:00
input.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
input.h Allow binding nul (zero byte) 2019-09-14 16:37:57 -07:00
input_common.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
input_common.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
intern.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
intern.h
io.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
io.h Correct handling of explicitly separated output when all elements are empty 2019-07-21 14:00:27 -07:00
iothread.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
iothread.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
kill.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
kill.h fix typos 2019-10-23 19:38:44 +02:00
lru.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
maybe.h Reformat all files 2019-05-05 12:09:25 +02:00
output.cpp Apply --reverse for fish_color_*'s being used for a background 2019-10-22 16:28:56 -07:00
output.h Switches over to cstring from string.h. 2019-03-12 15:09:36 -07:00
pager.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
pager.h Move selection_direction_t to pager.h and make it a class enum 2019-04-28 14:06:03 -07:00
parse_constants.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
parse_execution.cpp Support for &> and &| as convenience redirections 2019-10-27 15:24:57 -07:00
parse_execution.h Remove all block_t subclasses 2019-05-19 14:44:40 -07:00
parse_grammar.h Update comment 2019-10-27 06:58:20 +01:00
parse_grammar_elements.inc
parse_productions.cpp typo 2019-10-24 10:46:02 +02:00
parse_productions.h
parse_tree.cpp Correctly highlight input following a tokenizer error 2019-10-27 16:08:49 -07:00
parse_tree.h Reformat all files 2019-05-05 12:09:25 +02:00
parse_util.cpp Clean up job_or_process_extent 2019-10-18 15:24:28 -07:00
parse_util.h Clean up some tokenization 2019-10-13 16:06:16 -07:00
parser.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
parser.h fix typos 2019-10-23 19:38:44 +02:00
parser_keywords.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
parser_keywords.h
path.cpp Always return absolute path in path_get_cdpath 2019-10-19 12:38:17 +02:00
path.h fix typos 2019-10-23 19:38:44 +02:00
postfork.cpp sucess -> success, failiure -> failure 2019-10-18 18:36:03 -07:00
postfork.h sucess -> success, failiure -> failure 2019-10-18 18:36:03 -07:00
print_help.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
print_help.h
proc.cpp Remove job_flags as an enum, just use a struct 2019-10-15 14:40:58 -07:00
proc.h Support for &> and &| as convenience redirections 2019-10-27 15:24:57 -07:00
reader.cpp read_ni: be more specific in error if a file can't be read 2019-10-14 01:43:35 -07:00
reader.h Introduce reader_test_should_cancel 2019-09-21 13:07:55 -07:00
redirection.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
redirection.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
sanity.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
sanity.h Eliminate the global jobs() function 2019-05-05 11:33:08 -07:00
screen.cpp Clean up a few string handling bits 2019-10-27 16:22:42 -07:00
screen.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
signal.cpp Eliminate shell_is_interactive 2019-06-29 11:28:26 -07:00
signal.h Eliminate shell_is_interactive 2019-06-29 11:28:26 -07:00
tinyexpr.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
tinyexpr.h [tinyexpr] Port to C++ 2018-12-30 19:34:06 +01:00
tnode.cpp Clean up and unify pipes and redirections 2019-10-15 11:26:41 -07:00
tnode.h Clean up and unify pipes and redirections 2019-10-15 11:26:41 -07:00
tokenizer.cpp Correctly highlight input following a tokenizer error 2019-10-27 16:08:49 -07:00
tokenizer.h Correctly highlight input following a tokenizer error 2019-10-27 16:08:49 -07:00
topic_monitor.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
topic_monitor.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
utf8.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
utf8.h
util.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
util.h Remove mini() and maxi() 2019-03-12 23:25:15 -07:00
wcstringutil.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
wcstringutil.h use std::tolower 2019-09-22 15:47:22 -07:00
wgetopt.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
wgetopt.h rearrange structure fields 2019-04-04 13:47:10 -07:00
wildcard.cpp fix typos 2019-10-23 19:38:44 +02:00
wildcard.h Remove EXPAND prefix from expand_flags and lowercase them 2019-04-25 11:34:49 -07:00
wutil.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
wutil.h Run clang-format on all files 2019-10-13 15:50:48 -07:00