summaryrefslogtreecommitdiff
path: root/absl/flags/internal/parse.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-01-04 04:10:37 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-01-04 04:11:16 -0800
commit74d8b4d9bd5f8cf7b949b01e106c33cd0f0eba0a (patch)
treeef75cac5a790232f59949980a9ee99d6dd26672a /absl/flags/internal/parse.h
parent4e4e8d285490c122b22e4ba1c025c453e556dd1e (diff)
Suggest similar flags in case of undefined flags.
Using Damerau-Levenshtein distance to calculate potential candidates to suggest. PiperOrigin-RevId: 499449034 Change-Id: I805aafefcd0f4f85585ac33a041c15360619c96a
Diffstat (limited to 'absl/flags/internal/parse.h')
-rw-r--r--absl/flags/internal/parse.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/flags/internal/parse.h b/absl/flags/internal/parse.h
index de706c89..0a7012fc 100644
--- a/absl/flags/internal/parse.h
+++ b/absl/flags/internal/parse.h
@@ -52,6 +52,10 @@ std::vector<char*> ParseCommandLineImpl(int argc, char* argv[],
// command line or specified in flag file present on the original command line.
bool WasPresentOnCommandLine(absl::string_view flag_name);
+// Return existing flags similar to the parameter, in order to help in case of
+// misspellings.
+std::vector<std::string> GetMisspellingHints(absl::string_view flag);
+
} // namespace flags_internal
ABSL_NAMESPACE_END
} // namespace absl