11#[ derive( Debug , clap:: Parser ) ]
2- #[ clap( name = "git-branch-stash" , about, author, version) ]
3- #[ clap(
4- setting = clap:: AppSettings :: DeriveDisplayOrder ,
5- dont_collapse_args_in_usage = true ,
2+ #[ command( name = "git-branch-stash" , about, author, version) ]
3+ #[ command(
64 args_conflicts_with_subcommands = true ,
75 color = concolor_clap:: color_choice( ) ,
86 ) ]
97pub struct Args {
10- #[ clap ( subcommand) ]
8+ #[ command ( subcommand) ]
119 pub subcommand : Option < Subcommand > ,
1210
13- #[ clap ( flatten) ]
11+ #[ command ( flatten) ]
1412 pub push : PushArgs ,
1513
16- #[ clap ( flatten) ]
14+ #[ command ( flatten) ]
1715 pub ( crate ) color : concolor_clap:: Color ,
1816
19- #[ clap ( flatten) ]
17+ #[ command ( flatten) ]
2018 pub verbose : clap_verbosity_flag:: Verbosity < clap_verbosity_flag:: InfoLevel > ,
2119}
2220
@@ -41,39 +39,39 @@ pub enum Subcommand {
4139#[ derive( Debug , clap:: Args ) ]
4240pub struct PushArgs {
4341 /// Specify which stash stack to use
44- #[ clap ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
42+ #[ arg ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
4543 pub stack : String ,
4644
4745 /// Annotate the snapshot with the given message
48- #[ clap ( short, long) ]
46+ #[ arg ( short, long) ]
4947 pub message : Option < String > ,
5048}
5149
5250#[ derive( Debug , clap:: Args ) ]
5351pub struct ListArgs {
5452 /// Specify which stash stack to use
55- #[ clap ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
53+ #[ arg ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
5654 pub stack : String ,
5755}
5856
5957#[ derive( Debug , clap:: Args ) ]
6058pub struct ClearArgs {
6159 /// Specify which stash stack to use
62- #[ clap ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
60+ #[ arg ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
6361 pub stack : String ,
6462}
6563
6664#[ derive( Debug , clap:: Args ) ]
6765pub struct DropArgs {
6866 /// Specify which stash stack to use
69- #[ clap ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
67+ #[ arg ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
7068 pub stack : String ,
7169}
7270
7371#[ derive( Debug , clap:: Args ) ]
7472pub struct ApplyArgs {
7573 /// Specify which stash stack to use
76- #[ clap ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
74+ #[ arg ( default_value = git_branch_stash:: Stack :: DEFAULT_STACK ) ]
7775 pub stack : String ,
7876}
7977
0 commit comments