updated readme
This commit is contained in:
@@ -19,5 +19,7 @@ pub enum CommandArg {
|
||||
/// Port for the Live Server
|
||||
#[arg(short, long)]
|
||||
port: Option<u16>
|
||||
}
|
||||
},
|
||||
/// Information about the completions
|
||||
Completions
|
||||
}
|
||||
|
||||
21
src/app/commands/completions.rs
Normal file
21
src/app/commands/completions.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use colored::Colorize;
|
||||
|
||||
const INFO: &str = "
|
||||
You can add completions for docki with the following methods. If you want the completions to be persistent add
|
||||
them to a init file e.g. ~/.zshrc, ~/.bashrc, ~/.config/fish/config.fish.
|
||||
|
||||
Get Fish Completions
|
||||
source ~/.docki/completions/docki.fish
|
||||
|
||||
Get Zsh Completions
|
||||
source ~/.docki/completions/_docki
|
||||
|
||||
Get Bash Completions
|
||||
source ~/.docki/completions/docki.bash
|
||||
";
|
||||
|
||||
pub fn completions() {
|
||||
println!();
|
||||
println!("{}", "Completions".blue().bold());
|
||||
println!("{}", INFO.bright_black());
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
pub mod executions;
|
||||
pub mod build;
|
||||
pub mod completions;
|
||||
pub mod executions;
|
||||
pub mod health;
|
||||
pub mod install_reveal;
|
||||
pub mod serve;
|
||||
|
||||
@@ -9,6 +9,7 @@ use std::env;
|
||||
|
||||
use self::args::{args, structure::CommandArg};
|
||||
use self::commands::build::build;
|
||||
use self::commands::completions::completions;
|
||||
use self::commands::health::health;
|
||||
use self::commands::install_reveal::install_reveal;
|
||||
use self::commands::serve::serve;
|
||||
@@ -25,7 +26,8 @@ impl App {
|
||||
CommandArg::Build => build().await,
|
||||
CommandArg::Health => health(),
|
||||
CommandArg::InstallReveal => install_reveal().await,
|
||||
CommandArg::Serve { port } => serve(port).await
|
||||
CommandArg::Serve { port } => serve(port).await,
|
||||
CommandArg::Completions => completions()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user