From feea12751a0ba24f2cf513030ab2d17043c62f15 Mon Sep 17 00:00:00 2001 From: Lucas Pickering Date: Tue, 8 Oct 2024 07:29:34 -0400 Subject: [PATCH] Add command aliases --- CHANGELOG.md | 2 ++ src/commands/run.rs | 3 ++- src/commands/set.rs | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7093459..9798977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ - Add shell completions, accessed by enabling the `COMPLETE` environment variable [#6](https://github.com/LucasPickering/env-select/issues/6) - For example, adding `COMPLETE=fish es | source` to your `fish.config` will enable completions for fish - [See docs](https://env-select.lucaspickering.me/book/user_guide/shell_completions.html) for more info and a list of supported shells +- Add command aliases + - `es r` alias for `es run`, `es s` for `es set` ### Changed diff --git a/src/commands/run.rs b/src/commands/run.rs index ce0c04d..5ae6428 100644 --- a/src/commands/run.rs +++ b/src/commands/run.rs @@ -11,8 +11,9 @@ use clap::Parser; /// The passed command is run through your shell, meaning you can use aliases /// and other shell features. See /// https://env-select.lucaspickering.me/book/user_guide/run_advanced.html for -/// more details of shell interactions. +/// more details on shell interactions. #[derive(Clone, Debug, Parser)] +#[clap(visible_alias = "r")] pub struct RunCommand { #[command(flatten)] selection: Selection, diff --git a/src/commands/set.rs b/src/commands/set.rs index a375244..b2bc99a 100644 --- a/src/commands/set.rs +++ b/src/commands/set.rs @@ -10,6 +10,7 @@ const WEBSITE: &str = "https://env-select.lucaspickering.me"; /// Modify current shell environment #[derive(Clone, Debug, Parser)] +#[clap(visible_alias = "s")] pub struct SetCommand { #[command(flatten)] selection: Selection,