asdf now optionally allows git-style 'foo bar' sub-commands, so the
completion system should too.
Implement support for `asdf latest` and `asdf install foo latest`
Add a zsh-native completion system function for `asdf`.
I too often hit snags with bash completions in zsh, so I bias strongly
towards zsh-native completions.
This needs to end up in `$fpath` with a filename of `_asdf` but it
seemed unfriendly to use that name in this repo, so call it `_asdf.zsh`
and document a symlink. Mark the file as executable to be compatible
with one convention of "personal functions should only autoload if
executable" (but that's probably so historic that very few people still
use it; I'm one of them, though).
OSX `sed` is not GNU `sed`, and doesn't support the `\s` whitespace character sequence. This results in autocompletion suggestions including leading spaces, e.g.,
```
$ asdf local python \ \ 3.8.0
```
Using the POSIX compliant `[[:space:]]` sequence is more compatible, and removes the unnecessary spaces on OSX.
Add a "shell" command similar to the existing "global" and "local"
commands, which sets the version in an environment variable instead of
writing it to a file. This was inspired by the similar functionality in
rbenv.
It works by adding a wrapper function for the asdf command. It forwards
to a "sh-shell" command that returns the exports as shell code which is
then evaled by the wrapper. This is a little gross, but we need to run
the code in the shell context in order to set variables.
Resolves#378
Attempting to tab-complete an asdf command would result in a deprecation warning being printed.
The --authoritative/-A and --unauthoritative/-u flags have been removed from the `complete` command.
Context: https://github.com/fish-shell/fish-shell/pull/3660
* Rename `asdf which` -> `asdf current`
* Output `set by $path` with current command
* Use dummy plugin in current_command test
* Hide "set by" message if derived from legacy file