aboutsummaryrefslogtreecommitdiffstats
path: root/mageia4arm.bashcompletion
diff options
context:
space:
mode:
Diffstat (limited to 'mageia4arm.bashcompletion')
-rw-r--r--mageia4arm.bashcompletion21
1 files changed, 15 insertions, 6 deletions
diff --git a/mageia4arm.bashcompletion b/mageia4arm.bashcompletion
index b2f4007..c790e83 100644
--- a/mageia4arm.bashcompletion
+++ b/mageia4arm.bashcompletion
@@ -2,12 +2,14 @@
_mageia4arm_completions()
{
local cur prev commands i PLATFORMS_PATH
- 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 "
+ commands="--all --build-path --clean --log --config --target --target-version --mga-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"
+ MGA_VERSION_LIST="1 2 3 4 5 6 7 cauldron"
+
if [ -e /usr/share/mageia4arm/platforms ]; then
if [ -d /usr/share/mageia4arm/platforms ]; then
PLATFORMS_PATH="/usr/share/mageia4arm/platforms"
@@ -43,18 +45,22 @@ _mageia4arm_completions()
prev=${COMP_WORDS[COMP_CWORD-1]}
pprev=${COMP_WORDS[COMP_CWORD-2]}
- if [ ${pprev} == "--config" ]; then
+ if [ ${pprev} == "--build-path" ]; then
prev=jump
- elif [ ${pprev} == "--size" ]; then
+ elif [ ${pprev} == "--config" ]; then
+ prev=jump
+ elif [ ${pprev} == "--desktop" ]; then
+ prev=jump
+ elif [ ${pprev} == "--mga-version" ]; then
+ prev=jump
+ elif [ ${pprev} == "--package" ]; then
prev=jump
- elif [ ${pprev} == "--build-path" ]; then
+ elif [ ${pprev} == "--size" ]; then
prev=jump
elif [ ${pprev} == "--target" ]; then
prev=jump
elif [ ${pprev} == "--target-version" ]; then
prev=jump
- elif [ ${pprev} == "--package" ]; then
- prev=jump
fi
@@ -62,6 +68,9 @@ _mageia4arm_completions()
--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" ) )
;;
+ --mga-version)
+ COMPREPLY=( $( compgen -W "${MGA_VERSION_LIST}" -- "$cur" ) )
+ ;;
--desktop)
COMPREPLY=( $( compgen -W "${DESKTOP_LIST}" -- "$cur" ) )
;;