diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-02-03 06:47:26 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2020-01-03 18:21:42 +0300 |
commit | 80732cdf9c4a6beb19226d720ffb20cb505bc6e4 (patch) | |
tree | eddfc0cdb57461fbdcd57d91ee6339e9a6b069f6 /src/node_options.h | |
parent | 1357c97a70e4b1552575079ae806573557bcb509 (diff) |
src: port --bash-completion to C++
So that it gets handle earlier and faster during the bootstrap
process.
Drive-by fixes:
- Remove `[has_eval_string]` and `[ssl_openssl_cert_store]` from
the completion output
- Set `kProfProcess` execution mode for `--prof-process` instead
of `kPrintBashProcess` which is removed in this patch.
- Append new line to the end of the output of --bash-completion
PR-URL: https://github.com/nodejs/node/pull/25901
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_options.h')
-rw-r--r-- | src/node_options.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_options.h b/src/node_options.h index 35f0b032d04..218fb4ac238 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -254,6 +254,7 @@ namespace options_parser { HostPort SplitHostPort(const std::string& arg, std::vector<std::string>* errors); void GetOptions(const v8::FunctionCallbackInfo<v8::Value>& args); +std::string GetBashCompletion(); enum OptionType { kNoOp, @@ -437,6 +438,7 @@ class OptionsParser { friend class OptionsParser; friend void GetOptions(const v8::FunctionCallbackInfo<v8::Value>& args); + friend std::string GetBashCompletion(); }; using StringVector = std::vector<std::string>; |