-
Notifications
You must be signed in to change notification settings - Fork 69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to do a quick look to see if there are methods built in to structopt to "hide" or "demote" some subcommands, but if you don't hear from me merge away :P
Something like https://docs.rs/structopt/0.3.8/structopt/#raw-methods Edit: I can't get it to work. |
I cracked it! diff --git a/src/cli.rs b/src/cli.rs
index df639f6..36675ac 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -34,7 +34,7 @@ pub enum Command {
Shell(ShellOptions),
/// (internal) Used internally by `lorri shell`
- #[structopt(name = "zz_start_user_shell")]
+ #[structopt(name = "zz_start_user_shell", raw(setting = "structopt::clap::AppSettings::Hidden"))]
StartUserShell_(StartUserShellOptions_),
/// Build project whenever an input file changes
@@ -46,7 +46,7 @@ pub enum Command {
Daemon,
/// (internal) Tell the lorri daemon to care about the current directory's project
- #[structopt(name = "zz_ping")]
+ #[structopt(name = "zz_ping", raw(setting = "structopt::clap::AppSettings::Hidden"))]
Ping_(Ping_),
/// Upgrade lorri maybe with this we can rename |
The trick was going back in time to the docs for the version of structopts we use: https://docs.rs/structopt/0.2.18/structopt/ and playing with the |
Nice |
- Use "lorri" consistently instead of mixing "Lorri" and "lorri" - Use "internal" instead of "plumbing" for internal commands - Rename "ping_" to "internal__ping" and "start_user_shell_" to "internal__start_user_shell" and hide both from the autogenerated help ------------------------------------------------------------------------------- lorri help: before the changes ------------------------------------------------------------------------------- lorri 0.1.0 Graham Christensen <[email protected]> Global arguments which set global program state. Most arguments will be to sub-commands. USAGE: lorri [FLAGS] <SUBCOMMAND> FLAGS: -h, --help Prints help information -V, --version Prints version information -v, --verbose Activate debug logging. Multiple occurrences are accepted for backwards compatibility, but have no effect. SUBCOMMANDS: daemon Start the multi-project daemon. Replaces `lorri watch` direnv Emit shell script intended to be evaluated as part of direnv's .envrc, via: `eval "$(lorri direnv)"` help Prints this message or the help of the given subcommand(s) info Show information about the current Lorri project init Bootstrap files for a new setup ping_ (plumbing) Tell the lorri daemon to care about the current directory's project self-upgrade Upgrade Lorri shell Open a new shell start_user_shell_ (plumbing) Internal command used to launch user shell watch Build `shell.nix` whenever an input file changes ------------------------------------------------------------------------------- lorri help: after the changes ------------------------------------------------------------------------------- lorri 0.1.0 Graham Christensen <[email protected]> Global arguments which set global program state. Most arguments will be to sub-commands. USAGE: lorri [FLAGS] <SUBCOMMAND> FLAGS: -h, --help Prints help information -V, --version Prints version information -v, --verbose Activate debug logging. Multiple occurrences are accepted for backwards compatibility, but have no effect. SUBCOMMANDS: daemon Start the multi-project daemon. Replaces `lorri watch` direnv Emit shell script intended to be evaluated as part of direnv's .envrc, via: `eval "$(lorri direnv)"` help Prints this message or the help of the given subcommand(s) info Show information about a lorri project init Write bootstrap files to current directory to create a new lorri project self-upgrade Upgrade lorri shell Open a new project shell watch Build project whenever an input file changes
7b04bb4
to
84fa275
Compare
Overview
Just a little cleanup before we go to 1.0.
See 84fa275 commit message.
Checklist
release.nix
(seerelease.nix
for instructions)