From afba41995de65d8f378b138ea6d9804be32625a3 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 23 Apr 2013 23:49:46 -0400 Subject: systemctl: show reverse dependencies or before/after ordering Also update completion scripts a bit. --- shell-completion/bash/systemctl | 4 ++-- shell-completion/systemd-zsh-completion.zsh | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'shell-completion') diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl index f5829b72f8..191b8d13ec 100644 --- a/shell-completion/bash/systemctl +++ b/shell-completion/bash/systemctl @@ -70,7 +70,7 @@ _systemctl () { local i verb comps mode local -A OPTS=( - [STANDALONE]='--all -a --defaults --fail --ignore-dependencies --failed --force -f --full --global + [STANDALONE]='--all -a --reverse --after --before --defaults --fail --ignore-dependencies --failed --force -f --full --global --help -h --no-ask-password --no-block --no-legend --no-pager --no-reload --no-wall --quiet -q --privileged -P --system --user --version --runtime' [ARG]='--host -H --kill-mode --kill-who --property -p --signal -s --type -t --root' @@ -117,7 +117,7 @@ _systemctl () { fi local -A VERBS=( - [ALL_UNITS]='is-active is-failed is-enabled status show mask preset help' + [ALL_UNITS]='is-active is-failed is-enabled status show mask preset help list-dependencies' [ENABLED_UNITS]='disable' [DISABLED_UNITS]='enable' [REENABLABLE_UNITS]='reenable' diff --git a/shell-completion/systemd-zsh-completion.zsh b/shell-completion/systemd-zsh-completion.zsh index 8b60859c23..73db3786d6 100644 --- a/shell-completion/systemd-zsh-completion.zsh +++ b/shell-completion/systemd-zsh-completion.zsh @@ -12,6 +12,9 @@ _ctls() {-t,--type=}'[List only units of a particular type]:unit type:(automount device mount path service snapshot socket swap target timer)' \ \*{-p,--property=}'[Show only properties by specific name]:unit property' \ {-a,--all}'[Show all units/properties, including dead/empty ones]' \ + '--reverse[Show reverse dependencies]' \ + '--after[Show units ordered after]' \ + '--before[Show units ordered before]' \ '--failed[Show only failed units]' \ "--full[Don't ellipsize unit names on output]" \ '--fail[When queueing a new job, fail if conflicting jobs are pending]' \ @@ -348,6 +351,8 @@ _outputmodes() { "disable:Disable one or more unit files" "reenable:Reenable one or more unit files" "preset:Enable/disable one or more unit files based on preset configuration" + "help:Show documentation for specified units" + "list-dependencies:Show unit dependency tree" "mask:Mask one or more units" "unmask:Unmask one or more units" "link:Link one or more units files into the search path" @@ -462,7 +467,7 @@ _systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files _systemctl_masked_units() {_sys_masked_units=( $(__systemctl list-unit-files | { while read a b; do [[ $b == "masked" ]] && echo " $a"; done; }) )} # Completion functions for ALL_UNITS -for fun in is-active is-failed is-enabled status show mask preset ; do +for fun in is-active is-failed is-enabled status show mask preset help list-dependencies ; do (( $+functions[_systemctl_$fun] )) || _systemctl_$fun() { _systemctl_really_all_units -- cgit v1.2.3-54-g00ecf