mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
build: bump clap from 3.0.14 to 3.1.0 (#3630)
* build: bump clap from 3.0.14 to 3.1.0 Bumps [clap](https://github.com/clap-rs/clap) from 3.0.14 to 3.1.0. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.0.14...clap_complete-v3.1.0) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * refactor(clap): fix deprecation warnings Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
+6
-5
@@ -4,7 +4,7 @@ use clap::crate_authors;
|
||||
use std::io;
|
||||
use std::time::SystemTime;
|
||||
|
||||
use clap::{AppSettings, IntoApp, Parser, Subcommand};
|
||||
use clap::{IntoApp, Parser, Subcommand};
|
||||
use clap_complete::{generate, Shell as CompletionShell};
|
||||
use rand::distributions::Alphanumeric;
|
||||
use rand::Rng;
|
||||
@@ -22,9 +22,10 @@ fn long_version() -> &'static str {
|
||||
author=crate_authors!(),
|
||||
version=shadow::PKG_VERSION,
|
||||
long_version=long_version(),
|
||||
about="The cross-shell prompt for astronauts. ☄🌌️"
|
||||
about="The cross-shell prompt for astronauts. ☄🌌️",
|
||||
subcommand_required=true,
|
||||
arg_required_else_help=true,
|
||||
)]
|
||||
#[clap(setting(AppSettings::SubcommandRequiredElseHelp))]
|
||||
struct Cli {
|
||||
#[clap(subcommand)]
|
||||
command: Commands,
|
||||
@@ -88,7 +89,7 @@ enum Commands {
|
||||
/// Generate random session key
|
||||
Session,
|
||||
/// Prints time in milliseconds
|
||||
#[clap(setting=AppSettings::Hidden)]
|
||||
#[clap(hide = true)]
|
||||
Time,
|
||||
/// Prints timings of all active modules
|
||||
Timings(Properties),
|
||||
@@ -206,7 +207,7 @@ fn main() {
|
||||
Commands::Timings(props) => print::timings(props),
|
||||
Commands::Completions { shell } => generate(
|
||||
shell,
|
||||
&mut Cli::into_app(),
|
||||
&mut Cli::command(),
|
||||
"starship",
|
||||
&mut io::stdout().lock(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user