forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-generate shell completions for solana-cli (issue solana-labs#8879 …
…and solana-labs#14005) Implement `completion` SubCommand for solana-cli, which outputs completion script to stdout and exits the process. The script generation handled completely by clap. In order to implement the generation, one minor design change was necessary regarding the creation of clap `App`. Previously: One part of App initialization was in the `app` function, and some other arguments and subcommands were added later directly in the `main` function. Now: The whole construction of App was moved to `get_clap_app` function. P.S. I wasn't sure if constructing App separately had visual importance, so both constructing parts are still separate in `base_clap_app` and `final_clap_app` functions. But they sure could be in one single function.
- Loading branch information
1 parent
6980d42
commit 8ae0a81
Showing
8 changed files
with
253 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.