mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 05:17:11 -07:00
Completion of install now admits a path for local installs.
Resolves issue #16.
This commit is contained in:
parent
d276be6768
commit
b6a1469ed5
2 changed files with 12 additions and 4 deletions
|
@ -89,10 +89,15 @@ complete -c sdk -f -n '__fish_sdkman_no_command' \
|
|||
complete -c sdk -f -n '__fish_sdkman_using_command i install' \
|
||||
-a "(__fish_sdkman_candidates)"
|
||||
complete -c sdk -f -n '__fish_sdkman_specifying_candidate i install' \
|
||||
-a "a.b.c x.y.z" -d "version list unavailable"
|
||||
# TODO complete available versions --> #4
|
||||
complete -c sdk -f -n '__fish_sdkman_command_has_enough_parameters 2 i install'
|
||||
# block
|
||||
-a 'a.b.c' \
|
||||
-d "version list unavailable"
|
||||
complete -c sdk -f -n '__fish_sdkman_specifying_candidate i install' \
|
||||
-a 'x.y.z' \
|
||||
-d "Add your own; specify path!"
|
||||
# Implicit: complete files as fourth parameter
|
||||
complete -c sdk -f -n '__fish_sdkman_command_has_enough_parameters 3 i install'
|
||||
# block
|
||||
|
||||
# uninstall
|
||||
complete -c sdk -f -n '__fish_sdkman_no_command' \
|
||||
|
|
|
@ -101,11 +101,14 @@ test_cases = {
|
|||
"flush ant " => [],
|
||||
|
||||
# Fourth parameters complete correctly
|
||||
"install ant 1.10.2 " => [],
|
||||
"install ant 1.10.2-mine /tm" => ["/tmp/"],
|
||||
"uninstall ant 1.10.1 " => [],
|
||||
"use ant 1.10.1 " => [],
|
||||
"default ant 1.10.1 " => [],
|
||||
|
||||
# Fifth parameters complete correctly
|
||||
"install ant 1.10.2-mine /tmp " => [],
|
||||
|
||||
# Lists of all candidates work
|
||||
"install gr" => ["gradle", "grails", "groovy", "groovyserv"],
|
||||
"install grad" => ["gradle"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue