Skip to content

Commit

Permalink
making default command ns instead of ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
Pvlerick committed Nov 8, 2024
1 parent 5f53bd2 commit 0a15f31
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kubectl-copi"
version = "0.1.0"
version = "0.2.0"
edition = "2021"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Once installed, it can be invoked using `kubectl copi`:
Usage: kubectl-copi [COMMAND]
Commands:
ctx Pick a context from the kube config - Default command if none is specified
ns Pick a namespace for the current context
ctx Pick a context from the kube config
ns Pick a namespace for the current context - Default command if none is specified
help Print this message or the help of the given subcommand(s)
Options:
Expand Down
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ pub struct Args {

#[derive(Subcommand, Debug, PartialEq)]
pub enum Command {
/// Pick a context from the kube config - Default command if none is specified
/// Pick a context from the kube config
#[command(name = "ctx")]
PickContext,
/// Pick a namespace for the current context
/// Pick a namespace for the current context - Default command if none is specified
#[command(name = "ns")]
PickNamespace,
}
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ async fn main() -> anyhow::Result<()> {
let args = Args::parse();

match args.command {
Some(Command::PickNamespace) => pick_namespace().await,
_ => pick_context(),
Some(Command::PickContext) => pick_context(),
_ => pick_namespace().await,
}
}

Expand Down

0 comments on commit 0a15f31

Please sign in to comment.