Commit Graph

38 Commits

Author SHA1 Message Date
James Hegedus
8ca2af3316
feat: cmd to print debug information (#787) 2020-08-24 10:55:41 +10:00
James Hegedus
50feef2a77
fix: CI formatting use editorconfig (#751) 2020-06-30 09:16:35 +10:00
Phil Pennock
f074257aa5 zsh: handle 'foo bar' == 'foo-bar' and latest
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`
2020-02-19 18:01:56 -05:00
James Hegedus
edc4d4027d rename zsh completions 2020-02-19 16:09:06 -05:00
Phil Pennock
7dc669c3ec Handle reshim, fix where, be more idiomatic
* Add completion for `reshim`
* Change completion for `where` for the second arg being optional
* Use slightly more idiomatic zsh
2020-02-19 16:06:00 -05:00
Phil Pennock
a8016c321d zsh-native asdf completion setup
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).
2020-02-19 16:06:00 -05:00
Mikhail Bulash
0b169e15b5 Fix bash completion for plugin-add 2020-01-28 12:35:36 +03:00
Pablo Lalloni
5bad5f4214 Remove shebang lines of sourced scripts 2019-12-31 09:48:56 -03:00
Victor Hugo Borja
b8dc5f1604 Run shfmt on bash files 2019-11-29 10:15:38 -06:00
Kevin Lane
62ef77670d
Fix fish completion to say latest returns a stable version 2019-11-22 10:37:53 -08:00
Kevin Lane
36ba38d921
Add asdf latest command to show latest stable version of a tool 2019-11-22 10:37:52 -08:00
James Roeder
ac0cd0f4d0
Fix completion for OSX/Fish
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.
2019-11-13 12:22:08 -05:00
Daniel Perez
021e843f3f Add fish completions for which command 2019-03-23 21:39:08 +00:00
Daniel Perez
1d43a052fe
Merge pull request #480 from jonmast/add-shell-command
Add "shell" subcommand for setting versions in shell session
2019-03-20 19:02:59 +00:00
Daniel Perez
396e804966 Add update to Fish completions 2019-03-14 21:29:32 +00:00
Jonathan Mast
9116e8453d
Add "shell" subcommand for setting versions in shell session
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
2019-03-09 13:19:33 -05:00
Robert Liebowitz
fc1b3b9f87 Silence errors during tab completion 2018-11-16 07:25:33 -05:00
Daniel Perez
8ae7be11f7 Fix fish shell completions 2018-08-24 13:25:38 +02:00
Kenny Parnell
558583e6da
Fix lint error SC1102 2018-01-23 10:21:16 -05:00
Kenny Parnell
05161f2cf9
Update Bash Completions
- Add missing commands to completion
- Auto-completion for `plugin-add`. Only include plugins not included.
- Auto-completion for `update`
2018-01-22 23:46:47 -05:00
Trevor Brown
df66739fe1 Ignore new shellcheck warnings in bash completions function. 2017-12-27 10:45:16 -05:00
Jonathan Knapp
33d7d9c26c
Merge remote-tracking branch 'source/master' into origin/shellcheck 2017-10-01 09:15:22 -04:00
Daniel Perez
56b8456920 Fix tab formatting in fish completions 2017-09-27 16:41:49 +09:00
Daniel Perez
6a63299dec Update fish completions 2017-09-27 16:40:50 +09:00
Jonathan Knapp
808a8d48b7
Fix many shellcheck issues; ignore a few others 2017-09-04 10:09:47 -04:00
Fernando
1e9166e9bc Merge branch 'master' into which_command 2017-05-15 15:40:42 -03:00
Julian Laubstein
5fbf730c4c Added missing local and global to bash completion 2017-04-25 14:22:40 +02:00
Daniel Perez
ee842285bb Add system completions for fish 2017-03-27 09:00:40 -07:00
Trevor Brown
ca2bfa285a Add bash completion for the update command. 2017-03-17 21:48:11 -04:00
Fernando Crespo
fb4e263598 Initial support for which command 2017-03-14 10:56:59 -03:00
crzrcn
8ecfffcf5c Fix fish shell's deprecation warnings when using the complete command
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
2016-12-24 15:42:57 -08:00
Kevin Rockwood
ca1273e7d4 Rename which to current (#79)
* 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
2016-07-25 00:47:17 +09:00
David Bernheisel
29807fd154 zsh: remove _asdf completion. #68 2016-06-29 16:06:33 -04:00
Daniel Perez
3e31c40020 Make it possible to use fallback versions. 2016-05-04 02:22:48 +09:00
Daniel Perez
784d7e9f34 Add support for local and global commands. 2016-04-25 02:13:09 +09:00
Daniel Perez
3d388ec0a2 Add fish support. 2016-04-18 16:33:14 +09:00
Kenny Parnell
0ed957b59e Add bash completion 2016-02-29 02:53:43 -05:00
Justin
7476c02f0a Adds (very) basic zsh autocompletion 2015-12-05 11:14:37 +01:00