Commit Graph

12 Commits

Author SHA1 Message Date
Rosen Penev
8d54e928cd [clang-tidy] C to C++ headers
Found with modernize-deprecated-headers

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-25 14:17:49 -08:00
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
ridiculousfish
82eca4bc86 Run clang-format on all files
The main change here is to reorder headers.
2019-10-13 15:50:48 -07:00
Fabian Homborg
c2970f9618 Reformat all files
This runs build_tools/style.fish, which runs clang-format on C++, fish_indent on fish and (new) black on python.

If anything is wrong with the formatting, we should fix the tools, but automated formatting is worth it.
2019-05-05 12:09:25 +02:00
Fabian Homborg
fb7a6e5f34 Add builtin -q
Used to query for a builtin's existence, like `type -q` and `functions
-q` can be used to query for a things and a functions existence respectively.
2019-02-12 20:34:19 +01:00
ridiculousfish
d7b2576fb5 Mark short_options as const everywhere
These were needlessly mutable file-scoped variables.
2018-09-29 00:18:36 -04:00
Kurtis Rader
ec1e9ac98d standardize on builtin_missing_argument() 2017-07-01 14:03:47 -07:00
Kurtis Rader
dd191a9d4b more wgetopt_long() normalization 2017-06-29 21:49:57 -07:00
Kurtis Rader
37b8cfaeba avoid struct name clashes
Running the tests on travis revealed that some compilers (or at least
with some options) call the wrong struct constructor if there is more
than one struct with the same name but differing definitions.
2017-06-16 21:01:57 -07:00
Kurtis Rader
ffdabace5e more builtin style cleanup 2017-06-16 21:01:57 -07:00
Kurtis Rader
175570b7ed lint cleanup 2017-06-16 21:01:56 -07:00
Kurtis Rader
bda6426bf7 split builtin builtin into its own module 2017-06-16 21:01:56 -07:00