updated readme

This commit is contained in:
2023-04-28 09:23:33 +00:00
parent b5828d79c8
commit a3b8ba612c
10 changed files with 361 additions and 125 deletions

View File

@@ -19,5 +19,7 @@ pub enum CommandArg {
/// Port for the Live Server
#[arg(short, long)]
port: Option<u16>
}
},
/// Information about the completions
Completions
}

View 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());
}

View File

@@ -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;

View File

@@ -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()
};
}