fix: asdf shell command docs & help output (#737)

Co-authored-by: James Hegedus <james@jthegedus.com>
This commit is contained in:
Alexandre ZANNI 2020-06-13 02:43:52 +02:00 committed by GitHub
parent 45fffa9ce3
commit f5c7dae331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 3 deletions

View File

@ -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 |

View File

@ -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.

View File

@ -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() {

View File

@ -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)"

View File

@ -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" ]