File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ use crate :: utils:: config:: Config ;
2+
3+ use super :: * ;
4+
5+ use clap:: CommandFactory ;
6+ use clap_complete:: { generate, Shell } ;
7+ use std:: io;
8+
9+ /// Generate completion script
10+ #[ derive( Parser ) ]
11+ pub struct Args {
12+ shell : Shell ,
13+ }
14+
15+ pub async fn command ( args : Args , _config : Config ) -> Result < ( ) > {
16+ generate (
17+ args. shell ,
18+ & mut self :: Args :: command ( ) ,
19+ "envx" ,
20+ & mut io:: stdout ( ) ,
21+ ) ;
22+ Ok ( ( ) )
23+ }
Original file line number Diff line number Diff line change @@ -26,3 +26,4 @@ pub mod upload;
2626pub mod variables;
2727pub mod version;
2828pub mod whoami;
29+ pub mod completion;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ pub struct Args {
3131// Specify the modules you want to include in the commands_enum! macro
3232commands_enum ! (
3333 auth,
34+ completion,
3435 export,
3536 gen ,
3637 import,
You can’t perform that action at this time.
0 commit comments