Avoids leaking the 'i' variable to the user's shell session.
_systemctl () {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
_systemctl () {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local -A OPTS=(
[STANDALONE]='--all -a --defaults --fail --ignore-dependencies --failed --force -f --full --global
local -A OPTS=(
[STANDALONE]='--all -a --defaults --fail --ignore-dependencies --failed --force -f --full --global
_loginctl () {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
_loginctl () {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local -A OPTS=(
[STANDALONE]='--all -a --help -h --no-pager --privileged -P --version'
local -A OPTS=(
[STANDALONE]='--all -a --help -h --no-pager --privileged -P --version'
complete -F _journalctl journalctl
_timedatectl() {
complete -F _journalctl journalctl
_timedatectl() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local OPTS='-h --help --version --adjust-system-clock --no-pager
--no-ask-password -H --host'
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local OPTS='-h --help --version --adjust-system-clock --no-pager
--no-ask-password -H --host'
complete -F _timedatectl timedatectl
_localectl() {
complete -F _timedatectl timedatectl
_localectl() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local OPTS='-h --help --version --no-convert --no-pager --no-ask-password
-H --host'
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local OPTS='-h --help --version --no-convert --no-pager --no-ask-password
-H --host'
complete -F _localectl localectl
_hostnamectl() {
complete -F _localectl localectl
_hostnamectl() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local OPTS='-h --help --version --transient --static --pretty
--no-ask-password -H --host'
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local OPTS='-h --help --version --transient --static --pretty
--no-ask-password -H --host'