diff options
author | Jybz <j.biernacki@free.fr> | 2020-11-02 22:30:34 +0100 |
---|---|---|
committer | Jybz <j.biernacki@free.fr> | 2020-11-02 22:30:34 +0100 |
commit | 1253b3a7059e24f6aa0021f6ddf17f40087e590a (patch) | |
tree | 30ea167b130d254afc1182ed19e6724afa12d4ef /mageia4arm.bashcompletion | |
parent | 017adfd7b45f347c4d7243d75e7dccd117734191 (diff) | |
download | mageia4arm-1253b3a7059e24f6aa0021f6ddf17f40087e590a.tar mageia4arm-1253b3a7059e24f6aa0021f6ddf17f40087e590a.tar.gz mageia4arm-1253b3a7059e24f6aa0021f6ddf17f40087e590a.tar.bz2 mageia4arm-1253b3a7059e24f6aa0021f6ddf17f40087e590a.tar.xz mageia4arm-1253b3a7059e24f6aa0021f6ddf17f40087e590a.zip |
Add bash completion
Diffstat (limited to 'mageia4arm.bashcompletion')
-rw-r--r-- | mageia4arm.bashcompletion | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mageia4arm.bashcompletion b/mageia4arm.bashcompletion index 1429b12..b2f4007 100644 --- a/mageia4arm.bashcompletion +++ b/mageia4arm.bashcompletion @@ -2,10 +2,12 @@ _mageia4arm_completions() { local cur prev commands i PLATFORMS_PATH - commands="--all --build-path --clean --log --config --target --target-version --nonfree --size --tainted " + commands="--all --build-path --clean --log --config --target --target-version --nonfree --size --tainted --compress --add-checksum --add-urpmimedia --chroot --create-chroot --create-image --help --install-basesystem --jump-chroot --prepare-chroot --sign --update-mirror --desktop --package " COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} + DESKTOP_LIST="cinnamon cinnamon-minimal enlightenment enlightenment-minimal gnome gnome-minimal lxde lxde-minimal lxqt lxqt-minimal mate mate-minimal plasma5 plasma5-minimal sugar windowmaker xfce xfce-minimal fvwm2" + if [ -e /usr/share/mageia4arm/platforms ]; then if [ -d /usr/share/mageia4arm/platforms ]; then PLATFORMS_PATH="/usr/share/mageia4arm/platforms" @@ -51,13 +53,18 @@ _mageia4arm_completions() prev=jump elif [ ${pprev} == "--target-version" ]; then prev=jump + elif [ ${pprev} == "--package" ]; then + prev=jump fi case $prev in - --all|--clean|--nonfree|--tainted|--log|jump) + --all|--clean|--nonfree|--tainted|--log|--compress|--add-checksum|--add-urpmimedia|--chroot|--create-chroot|--create-image|--help|--install-basesystem|--jump-chroot|--prepare-chroot|--sign|--update-mirror|jump) COMPREPLY=( $( compgen -W "${commands} " -- "$cur" ) ) ;; + --desktop) + COMPREPLY=( $( compgen -W "${DESKTOP_LIST}" -- "$cur" ) ) + ;; --config) echo ${cur} | grep '/' &>/dev/null if [ 0 -eq ${?} ]; then |