diff --git a/crates/aiken/src/cmd/completion.rs b/crates/aiken/src/cmd/completion.rs index 92018953..158e4dae 100644 --- a/crates/aiken/src/cmd/completion.rs +++ b/crates/aiken/src/cmd/completion.rs @@ -1,5 +1,5 @@ -use clap::{Subcommand, Command}; -use clap_complete::{Shell, generate}; +use clap::{Command, Subcommand}; +use clap_complete::{generate, Shell}; use crate::cmd::Cmd as MainCmd; @@ -8,21 +8,26 @@ use crate::cmd::Cmd as MainCmd; pub enum Cmd { Bash, Zsh, - Fish + Fish, } pub fn exec(sub_cmd: Cmd) -> miette::Result<()> { let shell = match sub_cmd { Cmd::Bash => Shell::Bash, Cmd::Zsh => Shell::Zsh, - Cmd::Fish => Shell::Fish + Cmd::Fish => Shell::Fish, }; let cli = Command::new("aiken").disable_version_flag(true); let mut main = MainCmd::augment_subcommands(cli); - generate(shell, &mut main, "aiken".to_string(), &mut std::io::stdout()); + generate( + shell, + &mut main, + "aiken".to_string(), + &mut std::io::stdout(), + ); Ok(()) } diff --git a/crates/aiken/src/main.rs b/crates/aiken/src/main.rs index 2abc9568..fdfd708d 100644 --- a/crates/aiken/src/main.rs +++ b/crates/aiken/src/main.rs @@ -1,11 +1,8 @@ -use aiken::{ - cmd::{ - Cmd, - blueprint::{self, address}, - build, check, docs, fmt, lsp, new, - packages::{self, add}, - tx, uplc, completion, - }, +use aiken::cmd::{ + blueprint::{self, address}, + build, check, completion, docs, fmt, lsp, new, + packages::{self, add}, + tx, uplc, Cmd, }; use owo_colors::OwoColorize; @@ -26,7 +23,7 @@ fn main() -> miette::Result<()> { Cmd::Lsp(args) => lsp::exec(args), Cmd::Tx(sub_cmd) => tx::exec(sub_cmd), Cmd::Uplc(sub_cmd) => uplc::exec(sub_cmd), - Cmd::Completion(sub_cmd) => completion::exec(sub_cmd) + Cmd::Completion(sub_cmd) => completion::exec(sub_cmd), } }