diff options
author | ivanselin <ivanselin@yandex-team.ru> | 2022-02-10 16:48:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:40 +0300 |
commit | e84d04727ac10dd27e5dc3d72039544902f81288 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/getopt/small/completion_generator.cpp | |
parent | 496663edd3beee611468aedd4bb9ac100c1a118d (diff) | |
download | ydb-e84d04727ac10dd27e5dc3d72039544902f81288.tar.gz |
Restoring authorship annotation for <ivanselin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/getopt/small/completion_generator.cpp')
-rw-r--r-- | library/cpp/getopt/small/completion_generator.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/getopt/small/completion_generator.cpp b/library/cpp/getopt/small/completion_generator.cpp index 67e9b6c825..ac41988217 100644 --- a/library/cpp/getopt/small/completion_generator.cpp +++ b/library/cpp/getopt/small/completion_generator.cpp @@ -454,9 +454,9 @@ namespace NLastGetopt { TStringBuf sep = ""; for (auto& mode : modes) { if (!mode->Hidden && !mode->NoCompletion) { - line << sep << B(mode->Name); - sep = " "; - } + line << sep << B(mode->Name); + sep = " "; + } } line << "' -- ${cur}) )"; } @@ -509,10 +509,10 @@ namespace NLastGetopt { auto& line = L << "COMPREPLY+=( $(compgen -W '"; TStringBuf sep = ""; for (auto& opt : unorderedOpts) { - if (opt->IsHidden()) { - continue; - } - + if (opt->IsHidden()) { + continue; + } + for (auto& shortName : opt->GetShortNames()) { line << sep << "-" << B(TStringBuf(&shortName, 1)); sep = " "; @@ -531,7 +531,7 @@ namespace NLastGetopt { { I; for (auto& opt : unorderedOpts) { - if (opt->HasArg_ == EHasArg::NO_ARGUMENT || opt->IsHidden()) { + if (opt->HasArg_ == EHasArg::NO_ARGUMENT || opt->IsHidden()) { continue; } @@ -563,7 +563,7 @@ namespace NLastGetopt { auto& line = L << "opts='@("; TStringBuf sep = ""; for (auto& opt : unorderedOpts) { - if (opt->HasArg_ == EHasArg::NO_ARGUMENT || opt->IsHidden()) { + if (opt->HasArg_ == EHasArg::NO_ARGUMENT || opt->IsHidden()) { continue; } for (auto& shortName : opt->GetShortNames()) { |