feat: completion for archlinux-java (#8911)

* feat: completion for archlinux-java

* docs: update CHANGELOG.rst
This commit is contained in:
NextAlone 2022-04-27 04:13:22 +08:00 committed by GitHub
parent b032354a9f
commit 7ffb9359f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -97,6 +97,7 @@ Completions
- brightnessctl (:issue:`8758`)
- rclone (:issue:`8819`)
- tuned-adm (:issue:`8760`)
- archlinux-java
Improved terminal support

View File

@ -0,0 +1,9 @@
complete -c archlinux-java -f
complete -c archlinux-java -n __fish_use_subcommand -a status -d 'List installed Java environments and enabled one'
complete -c archlinux-java -n __fish_use_subcommand -a set -d 'Force <JAVA_ENV> as default'
complete -c archlinux-java -n __fish_use_subcommand -a unset -d 'Unset current default Java environment'
complete -c archlinux-java -n __fish_use_subcommand -a get -d 'Return the short name of the Java environment set as default'
complete -c archlinux-java -n __fish_use_subcommand -a fix -d 'Fix an invalid/broken default Java environment configuration'
complete -c archlinux-java -n __fish_use_subcommand -a help -d 'Show help'
complete -c archlinux-java -n "__fish_seen_subcommand_from set" -a "(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)"