File systemd-vboxinit.bash-completion of Package systemd-vboxinit

#!/usr/bin/env bash
# =================================================================================================================== #
#: Title           : systemd-vboxinit.bash-completion                                                                 #
#: Sypnosis        : systemd-vboxinit <TAB>                                                                           #
#: Date Created    : Wed Oct 02 07:57:25 2013 +0800  /  Wed Oct 02 03:11:58 2013 UTC                                  #
#: Last Edit       : Wed Apr 16 08:51:35 2025 +0800  /  Wed Apr 16 00:51:35 2025 UTC                                  #
#: License         : GPLv3                                                                                            #
#: Version         : 1.0.1                                                                                            #
#: Author          : Jason V. Ferrer '<jason.ferrer@gmail.com>'                                                       #
#: Description     : bash completion for systemd-vboxinit (Only long options for now).                                #
#: Options         : --about, --stop, --start, --disable, --license, --help                                           #
#: Home Page       : https://github.com/Jetchisel/VBoxAutostart                                                       #
#: Copyright       : Jason V. Ferrer 2013-2025                                                                        #
#: TODO            : Add short options for the completion options via <TAB> key.                                      #
# =================================================================================================================== #

__systemd_vboxinit(){
  local cur opts

  cur="${COMP_WORDS[COMP_CWORD]}"
  opts='--about --disable --help --license --start --stop'

  if [[ ${cur} = * ]] ; then
     mapfile -t COMPREPLY < <(compgen -W "${opts}" -- "$cur")
     return 0
  fi
}

complete -o nospace -F __systemd_vboxinit  systemd-vboxinit

# =================================================================================================================== #
#                                   '>> END OF SYSTEMD-VBOXINIT.BASH-COMPLETION <<'                                   #
# =================================================================================================================== #
openSUSE Build Service is sponsored by