mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
fix: asdf shell command docs & help output (#737)
Co-authored-by: James Hegedus <james@jthegedus.com>
This commit is contained in:
parent
45fffa9ce3
commit
f5c7dae331
@ -24,6 +24,7 @@
|
||||
| `asdf current <name>` | Display current version set or being used for package |
|
||||
| `asdf where <name> [<version>]` | Display install path for an installed or current version |
|
||||
| `asdf which <name>` | Display install path for current version |
|
||||
| `asdf shell <name> <version>` | Set the package version to `ASDF_${LANG}_VERSION` in the current shell |
|
||||
| `asdf local <name> <version>` | Set the package local version |
|
||||
| `asdf global <name> <version>` | Set the package global version |
|
||||
| `asdf latest <name> [<version>]` | Show latest stable version of a package |
|
||||
|
@ -60,12 +60,15 @@ asdf latest <name> <version>
|
||||
|
||||
```shell
|
||||
asdf global <name> <version> [<version>...]
|
||||
asdf shell <name> <version> [<version>...]
|
||||
asdf local <name> <version> [<version>...]
|
||||
# asdf global elixir 1.2.4
|
||||
```
|
||||
|
||||
`global` writes the version to `$HOME/.tool-versions`.
|
||||
|
||||
`shell` set the version to an environment variable named `ASDF_${LANG}_VERSION`, for the current shell session only.
|
||||
|
||||
`local` writes the version to `$PWD/.tool-versions`, creating it if needed.
|
||||
|
||||
See the `.tool-versions` [file in the Configuration section](core-configuration) for details.
|
||||
|
@ -217,7 +217,7 @@ find_versions() {
|
||||
|
||||
display_no_version_set() {
|
||||
local plugin_name=$1
|
||||
echo "No version set for ${plugin_name}; please run \`asdf <global | local> ${plugin_name} <version>\`"
|
||||
echo "No version set for ${plugin_name}; please run \`asdf <global | shell | local> ${plugin_name} <version>\`"
|
||||
}
|
||||
|
||||
get_version_from_env() {
|
||||
|
@ -92,7 +92,7 @@ teardown() {
|
||||
echo 'foobar 1.0.0' >> $PROJECT_DIR/.tool-versions
|
||||
|
||||
run asdf current
|
||||
expected="baz No version set for baz; please run \`asdf <global | local> baz <version>\`
|
||||
expected="baz No version set for baz; please run \`asdf <global | shell | local> baz <version>\`
|
||||
dummy 1.1.0 (set by $PROJECT_DIR/.tool-versions)
|
||||
foobar 1.0.0 (set by $PROJECT_DIR/.tool-versions)"
|
||||
|
||||
|
@ -57,7 +57,7 @@ function teardown() {
|
||||
run asdf where 'dummy'
|
||||
|
||||
local expected
|
||||
expected="No version set for dummy; please run \`asdf <global | local> dummy <version>\`"
|
||||
expected="No version set for dummy; please run \`asdf <global | shell | local> dummy <version>\`"
|
||||
|
||||
[ "$status" -eq 1 ]
|
||||
[ "$output" = "$expected" ]
|
||||
|
Loading…
Reference in New Issue
Block a user