From 07933936f35e7a2b41edc875a7e371d28100b056 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 31 May 2012 08:38:55 +0000 Subject: Foudil Brétel: _systemctl -> _systemd plus enhancements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Completion/Unix/Command/.distfiles | 2 +- Completion/Unix/Command/_systemctl | 311 ------------------------- Completion/Unix/Command/_systemd | 459 +++++++++++++++++++++++++++++++++++++ 3 files changed, 460 insertions(+), 312 deletions(-) delete mode 100644 Completion/Unix/Command/_systemctl create mode 100644 Completion/Unix/Command/_systemd (limited to 'Completion/Unix/Command') diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles index 34c1865a6..32b505d7a 100644 --- a/Completion/Unix/Command/.distfiles +++ b/Completion/Unix/Command/.distfiles @@ -212,7 +212,7 @@ _subversion _sudo _surfraw _sysctl -_systemctl +_systemd _tar _tardy _tcpdump diff --git a/Completion/Unix/Command/_systemctl b/Completion/Unix/Command/_systemctl deleted file mode 100644 index 3f54092a1..000000000 --- a/Completion/Unix/Command/_systemctl +++ /dev/null @@ -1,311 +0,0 @@ -#compdef systemctl - -# Copyright (c) 2011 Foudil Brétel -# -# This file is released under the GPLv3. -# -# inspired from _yum and systemctl-bash-completion.sh (shipped with systemctl) -# -# TODO: enable options after commands. Ex: systemctl list-units --all --full - -# Main dispatcher -_systemctl() -{ - local curcontext="$curcontext" state lstate line - - # -s for aggregated options like -aP - _arguments -s \ - {-h,--help}'[Show help]' \ - '--version[Show package version]' \ - {-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]' \ - '--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]' \ - '--ignore-dependencies[When queueing a new job, ignore all its dependencies]' \ - '--kill-mode=[How to send signal]:killmode:(control-group process)' \ - '--kill-who=[Who to send signal to]:killwho:(main control all)' \ - {-s,--signal=}'[Which signal to send]:signal:_signals' \ - {-H,--host=}'[Show information for remote host]:userathost:_hosts_or_user_at_host' \ - {-P,--privileged}'[Acquire privileges before execution]' \ - {-q,--quiet}'[Suppress output]' \ - '--no-block[Do not wait until operation finished]' \ - "--no-wall[Don't send wall message before halt/power-off/reboot]" \ - "--no-reload[When enabling/disabling unit files, don't reload daemon configuration]" \ - '--no-legend[Do not print a legend, i.e. the column headers and the footer with hints]' \ - '--no-pager[Do not pipe output into a pager]' \ - '--no-ask-password[Do not ask for system passwords]' \ - '--order[When generating graph for dot, show only order]' \ - '--require[When generating graph for dot, show only requirement]' \ - '--system[Connect to system manager]' \ - '--user[Connect to user service manager]' \ - '--global[Enable/disable unit files globally]' \ - {-f,--force}'[When enabling unit files, override existing symlinks. When shutting down, execute action immediately]' \ - '--defaults[When disabling unit files, remove default symlinks only]' \ - '--root=[Enable unit files in the specified root directory]:directory:_directories' \ - '*::systemctl command:_systemctl_command' -} - -_hosts_or_user_at_host() -{ - _alternative \ - 'users-hosts:: _user_at_host' \ - 'hosts:: _hosts' -} - -(( $+functions[_systemctl_command] )) || _systemctl_command() -{ - local -a _systemctl_cmds - _systemctl_cmds=( - "list-units:List units" - "start:Start (activate) one or more units" - "stop