diff options
author | lightqwant <lightqwant@yandex-team.com> | 2022-09-01 20:05:05 +0300 |
---|---|---|
committer | lightqwant <lightqwant@yandex-team.com> | 2022-09-01 20:05:05 +0300 |
commit | 7cfd122cb661b485fb0fb4139573a0beac97ae48 (patch) | |
tree | 5f205aaa2d0cdbc28370858218ff766fff8646a5 /library/cpp/getopt/small/last_getopt_opts.h | |
parent | c1f7f3324e630e845df52ba0d4ac0a7e0e7f0f9d (diff) | |
download | ydb-7cfd122cb661b485fb0fb4139573a0beac97ae48.tar.gz |
[getopt] Add typo check for long options
Diffstat (limited to 'library/cpp/getopt/small/last_getopt_opts.h')
-rw-r--r-- | library/cpp/getopt/small/last_getopt_opts.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/library/cpp/getopt/small/last_getopt_opts.h b/library/cpp/getopt/small/last_getopt_opts.h index 825b99c871..718dbfcb89 100644 --- a/library/cpp/getopt/small/last_getopt_opts.h +++ b/library/cpp/getopt/small/last_getopt_opts.h @@ -54,6 +54,7 @@ namespace NLastGetopt { bool AllowUnknownLongOptions_ = false; ui32 Wrap_ = 80; + bool CheckUserTypos_ = false; private: ui32 FreeArgsMin_; // minimal number of free args @@ -341,6 +342,14 @@ namespace NLastGetopt { } /** + * Set check user typos or not + * @param check bool flag for chosing + */ + void SetCheckUserTypos(bool check = true) { + CheckUserTypos_ = check; + } + + /** * Creates new [option description (TOpt)] for svn-revision printing, * adds appropriate handler for it. * If "svnversion" option already exist, will add given short name to it. |