From e2fae48e5997025c2df13a31a05ac5d1a02299da Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Sun, 4 Jun 2017 13:51:33 -0400 Subject: [PATCH] Adding prefix command to docs --- CHANGELOG.md | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a066720d..4814a7f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Version 1.1 (in progress) * Added `app.parse_order()` with original parse order +* Added `prefix_command()`, which is like `allow_extras` but instantly stops and returns. ## Version 1.0 * Cleanup using `clang-tidy` and `clang-format` diff --git a/README.md b/README.md index 402d5efb..728b4d8e 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,7 @@ There are several options that are supported on the main app and subcommands. Th * `.parsed()`: True if this subcommand was given on the command line * `.set_callback(void() function)`: Set the callback that runs at the end of parsing. The options have already run at this point. * `.allow_extras()`: Do not throw an error if extra arguments are left over (Only useful on the main `App`, as that's the one that throws errors). +* `.prefix_command()`: Like `allow_extras`, but stop immediately on the first unrecognised item. It is ideal for allowing your app to be a "prefix" to calling another app. ## Configuration file