summaryrefslogtreecommitdiff
path: root/AK/JsonPath.h
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-12-19 15:35:21 +0000
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-20 10:58:41 -0800
commit8461f8c1cd16240217b64c875d1fa8c6d428486f (patch)
treec1ba8b9c14837df683aed0a97dc458482b8fe220 /AK/JsonPath.h
parent4c91f736c74207efb044a788c3488153e65c5406 (diff)
downloadserenity-8461f8c1cd16240217b64c875d1fa8c6d428486f.zip
Help: Add support for launching with a section and page, like man
I found it strange that `man` and `Help` did not accept the same command line arguments since they are so similar. So... now they do. :^) This means you can now open for example the `tar` man page in Help with `Help tar`, or `Help 1 tar` if you want to disambiguate between pages in different sections. If the result is not found, it falls back to the previous behavior, treating the input as a search query. Initially I had this written as two optional positional arguments, but when told to parse `[optional int] [optional string]`, and then given a string input, ArgsParser forwards it to the [optional int], which then fails to parse. Ideally it would pass it to the second, [optional string] arg instead, but that looks like a fairly big change to make to ArgsParser's internals, and risk breaking things. Maybe this ugly hack will be an incentive to fix it. :^)
Diffstat (limited to 'AK/JsonPath.h')
0 files changed, 0 insertions, 0 deletions