diff --git a/completions/sdk.fish b/completions/sdk.fish index 46af977..4a9cd13 100644 --- a/completions/sdk.fish +++ b/completions/sdk.fish @@ -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' \ diff --git a/test/completion.rb b/test/completion.rb index a33a946..8ddf73d 100644 --- a/test/completion.rb +++ b/test/completion.rb @@ -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"],