-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1465
- Loading branch information
Showing
19 changed files
with
264 additions
and
64 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
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# `mise unuse` | ||
|
||
- **Usage**: `mise unuse [--no-prune] [--global] <INSTALLED_TOOL@VERSION>...` | ||
- **Aliases**: `rm`, `remove` | ||
- **Source code**: [`src/cli/unuse.rs`](https://github.com/jdx/mise/blob/main/src/cli/unuse.rs) | ||
|
||
Removes installed tool versions from mise.toml | ||
|
||
Will also prune the installed version if no other configurations are using it. | ||
|
||
## Arguments | ||
|
||
### `<INSTALLED_TOOL@VERSION>...` | ||
|
||
Tool(s) to remove | ||
|
||
## Flags | ||
|
||
### `--no-prune` | ||
|
||
Do not also prune the installed version | ||
|
||
### `--global` | ||
|
||
Remove tool from global config | ||
|
||
Examples: | ||
|
||
``` | ||
# will uninstall specific version | ||
$ mise remove node@18.0.0 | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
assert "mise use dummy@1.0.0" | ||
assert_contains "mise ls dummy" "1.0.0" | ||
assert "mise unuse dummy" | ||
assert_empty "mise ls dummy" | ||
|
||
assert "mise use dummy@1.0.0" | ||
mkdir subdir | ||
cd subdir || exit 1 | ||
assert "mise use -p mise.toml dummy@1.0.0" | ||
assert "mise ls dummy" "dummy 1.0.0 ~/workdir/subdir/mise.toml 1.0.0" | ||
assert "mise unuse dummy" | ||
# version is not pruned because it's in ~/workdir/mise.toml | ||
assert "mise ls dummy" "dummy 1.0.0 ~/workdir/mise.toml 1.0.0" | ||
assert "mise unuse dummy" | ||
assert_empty "mise ls dummy" | ||
|
||
assert "mise use -g dummy@1.0.0" | ||
assert "mise ls dummy" "dummy 1.0.0 ~/.config/mise/config.toml 1.0.0" | ||
assert "mise unuse dummy" | ||
assert_empty "mise ls dummy" |
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
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
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
Oops, something went wrong.