From 7ffb9359f686b31574012922c433938ca8ecf645 Mon Sep 17 00:00:00 2001 From: NextAlone <12210746+NextAlone@users.noreply.github.com> Date: Wed, 27 Apr 2022 04:13:22 +0800 Subject: [PATCH] feat: completion for archlinux-java (#8911) * feat: completion for archlinux-java * docs: update CHANGELOG.rst --- CHANGELOG.rst | 1 + share/completions/archlinux-java.fish | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 share/completions/archlinux-java.fish diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 760ed28c1..4761dab9d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -97,6 +97,7 @@ Completions - brightnessctl (:issue:`8758`) - rclone (:issue:`8819`) - tuned-adm (:issue:`8760`) + - archlinux-java Improved terminal support diff --git a/share/completions/archlinux-java.fish b/share/completions/archlinux-java.fish new file mode 100644 index 000000000..76fb13c73 --- /dev/null +++ b/share/completions/archlinux-java.fish @@ -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 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)"