-
-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add -g short version for unuse cmd (#4330)
For consistency with the inverse command 'use'.
- Loading branch information
Showing
5 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# `mise unuse` | ||
|
||
- **Usage**: `mise unuse [--no-prune] [--global] <INSTALLED_TOOL@VERSION>...` | ||
- **Usage**: `mise unuse [--no-prune] [-g --global] <INSTALLED_TOOL@VERSION>...` | ||
- **Aliases**: `rm`, `remove` | ||
- **Source code**: [`src/cli/unuse.rs`](https://github.com/jdx/mise/blob/main/src/cli/unuse.rs) | ||
|
||
|
@@ -20,13 +20,16 @@ Tool(s) to remove | |
|
||
Do not also prune the installed version | ||
|
||
### `--global` | ||
### `-g --global` | ||
|
||
Remove tool from global config | ||
|
||
Examples: | ||
|
||
``` | ||
# will uninstall specific version | ||
$ mise remove [email protected] | ||
$ mise unuse [email protected] | ||
# will uninstall specific version from global config | ||
$ mise unuse -g [email protected] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -903,9 +903,9 @@ cmd unset help="Remove environment variable(s) from the config file." { | |
cmd unuse help="Removes installed tool versions from mise.toml" { | ||
alias rm remove | ||
long_help "Removes installed tool versions from mise.toml\n\nWill also prune the installed version if no other configurations are using it." | ||
after_long_help "Examples:\n\n # will uninstall specific version\n $ mise remove [email protected]\n" | ||
after_long_help "Examples:\n\n # will uninstall specific version\n $ mise unuse [email protected]\n\n # will uninstall specific version from global config\n $ mise unuse -g [email protected]\n" | ||
flag --no-prune help="Do not also prune the installed version" | ||
flag --global help="Remove tool from global config" | ||
flag "-g --global" help="Remove tool from global config" | ||
arg <INSTALLED_TOOL@VERSION>... help="Tool(s) to remove" var=#true | ||
} | ||
cmd upgrade help="Upgrades outdated tools" { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ pub struct Unuse { | |
no_prune: bool, | ||
|
||
/// Remove tool from global config | ||
#[clap(long)] | ||
#[clap(short, long)] | ||
global: bool, | ||
} | ||
|
||
|
@@ -81,6 +81,9 @@ static AFTER_LONG_HELP: &str = color_print::cstr!( | |
r#"<bold><underline>Examples:</underline></bold> | ||
# will uninstall specific version | ||
$ <bold>mise remove [email protected]</bold> | ||
$ <bold>mise unuse [email protected]</bold> | ||
# will uninstall specific version from global config | ||
$ <bold>mise unuse -g [email protected]</bold> | ||
"# | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters