summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-05-18 00:58:24 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-05-18 01:08:09 -0400
commit903e7c37caaaedf8ab0b6c664f4946cce369c0f0 (patch)
tree1ffcdefe349bd598d88ca9c7014a83168bf7189c /shell-completion
parentc18d201808e70949b45fe206d9c29efb8107a152 (diff)
Use "new" --job-mode= option in more places
--irreversible/--ignore-dependencies/--fail are deprececated since 4dc5b821ae737914499119e29811fc3346e3d97c. Also add shell completions for --jobs-mode.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/systemctl.in8
-rw-r--r--shell-completion/zsh/_systemctl.in12
2 files changed, 14 insertions, 6 deletions
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index 34c9444353..c2707ba3a6 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.in
@@ -90,10 +90,10 @@ _systemctl () {
local i verb comps mode
local -A OPTS=(
- [STANDALONE]='--all -a --reverse --after --before --defaults --fail --ignore-dependencies --failed --force -f --full -l --global
+ [STANDALONE]='--all -a --reverse --after --before --defaults --failed --force -f --full -l --global
--help -h --no-ask-password --no-block --no-legend --no-pager --no-reload --no-wall
--quiet -q --privileged -P --system --user --version --runtime --recursive -r --firmware-setup'
- [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --root'
+ [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --job-mode --root'
)
if __contains_word "--user" ${COMP_WORDS[*]}; then
@@ -115,6 +115,10 @@ _systemctl () {
active inactive
dead elapsed exited listening mounted plugged running waiting'
;;
+ --job-mode)
+ comps='fail replace replace-irreversibly isolate
+ ignore-dependencies ignore-requirements flush'
+ ;;
--kill-who)
comps='all control main'
;;
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index cce9dea8b5..e123d31a72 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -353,11 +353,18 @@ _unit_properties() {
_values -s , "${_sys_all_properties[@]}"
}
+_job_modes() {
+ local -a _modes
+ _modes=(fail replace replace-irreversibly isolate ignore-dependencies ignore-requirements flush)
+ _values -s , "${_modes[@]}"
+}
+
_arguments -s \
{-h,--help}'[Show help]' \
'--version[Show package version]' \
{-t+,--type=}'[List only units of a particular type]:unit type:_unit_types' \
- '--state=[Display units in the specifyied state]:unit state:_unit_states' \
+ '--state=[Display units in the specified state]:unit state:_unit_states' \
+ '--job-mode=[Specify how to deal with other jobs]:mode:_job_modes' \
{-p+,--property=}'[Show only properties by specific name]:unit property:_unit_properties' \
{-a,--all}'[Show all units/properties, including dead/empty ones]' \
'--reverse[Show reverse dependencies]' \
@@ -365,10 +372,7 @@ _arguments -s \
'--before[Show units ordered before]' \
'--failed[Show only failed units]' \
{-l,--full}"[Don't ellipsize unit names on output]" \
- '--fail[When queueing a new job, fail if conflicting jobs are pending]' \
'--show-types[When showing sockets, show socket type]' \
- '--irreversible[Mark transactions as irreversible]' \
- '--ignore-dependencies[When queueing a new job, ignore all its dependencies]' \
{-i,--ignore-inhibitors}'[When executing a job, ignore jobs dependencies]' \
{-q,--quiet}'[Suppress output]' \
'--no-block[Do not wait until operation finished]' \