History log of /systemd/shell-completion/zsh/_systemctl.in
Revision Date Author Comments Expand
aabf5d42434082ae4e2d0c98d4705f58ee707567 28-Jan-2016 Lennart Poettering <lennart@poettering.net>

systemctl: rename "reload-or-try-restart" verb to "try-reload-or-restart" But also keep the old name as (undocumented) compatibility around. The reload-or-try-restart was documented to be a NOP if the unit is not running, since the previous commits this is also implemented. The old name suggests that the "try" logic only applies to restarting. Fix this, by moving the "try-" to the front, to indicate that the whole option is a NOP if the service isn't running.

36b4a7ba555540edb7648e0f97019280b4ac38de 11-Nov-2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

Remove snapshot unit type Snapshots were never useful or used for anything. Many systemd developers that I spoke to at systemd.conf2015, didn't even know they existed, so it is fairly safe to assume that this type can be deleted without harm. The fundamental problem with snapshots is that the state of the system is dynamic, devices come and go, users log in and out, timers fire... and restoring all units to some state from the past would "undo" those changes, which isn't really possible. Tested by creating a snapshot, running the new binary, and checking that the transition did not cause errors, and the snapshot is gone, and snapshots cannot be created anymore. New systemctl says: Unknown operation snapshot. Old systemctl says: Failed to create snapshot: Support for snapshots has been removed. IgnoreOnSnaphost settings are warned about and ignored: Support for option IgnoreOnSnapshot= has been removed and it is ignored http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html

840b2c0e77911bef3056f358b8d16a3253e4ab70 28-Sep-2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

shell-completion: use systemctl --state=help This way completion lists should stay up to date. Also use systemctl -t help to list types in zsh, as was already done in bash.

a0ab162a097c7d8ea4dbd4d868de5236610e8f14 06-Jun-2015 Daniel Hahler <git@thequod.de>

zsh-completion: optimize _filter_units_by_property Optimize _filter_units_by_property by calling `systemctl` only once with a list of units, and not once per unit. I could not reproduce the "Unknown unit" error mentioned in a FIXME, which might have made this necessary previously.

d34b7c117bd016cb9ef2c36d474c9a917924abda 29-May-2015 Eric Cook <llua@gmx.com>

zsh-completion: a more style/tag aware _systemctl using _wanted instead of calling compadd directly. this allows the user to customize possible matches. An example being, grouping units by type: autoload -Uz compinit; compinit zstyle ':completion:*' menu select zstyle ':completion:*' group-name '' zstyle ':completion:*' format 'Completing %d' zstyle -e ':completion:*:*:systemctl-(((re|)en|dis)able|(*re|)start|reload*):*' \ tag-order 'local type; for type in service template target socket; reply+=( systemd-units:-${type}:${type} ); reply=( "$reply systemd-units:-misc:misc" )' zstyle ':completion:*:systemd-units-template' ignored-patterns '^*@' zstyle ':completion:*:systemd-units-target' ignored-patterns '^*.target' zstyle ':completion:*:systemd-units-socket' ignored-patterns '^*.socket' zstyle ':completion:*:systemd-units-service' ignored-patterns '^*.service' zstyle ':completion:*:systemd-units-misc' ignored-patterns '*(@|.(service|socket|target))' also, <poke> http://lists.freedesktop.org/archives/systemd-devel/2015-May/032012.html

68c4f6d406a2bdac6957a67a077f182b0287cc3b 19-May-2015 Eric Cook <llua@gmx.com>

zsh-completion: fix completion of --user services By the time __systemctl is called, --user/--system are shifted out of `words' by _arguments. This patch queries the array sooner. In the case that both --user and --system are on the line when compsys runs, _sys_service_mgr is set to the latter. Which is seemingly how systemctl behaves. If neither are on the line, --system is set; for system services to be completed.

bf8864c2c07f3bdab4ab4287bf2b5d3b5ce21f5c 18-May-2015 Eric Cook <llua@gmx.com>

zsh-completion: make the arrays _sys_active_units, _sys_startable_units and _sys_restartable_units local to the completer.

2103d29d89f32546f95b9ec019be0ea06714c8c2 18-May-2015 Eric Cook <llua@gmx.com>

zsh-completion: removing more pointless forks I seem to have forgot about _systemctl_active_units().

463985a9f489c54b89ee7ce6ffd67501035420b4 18-May-2015 Eric Cook <llua@gmx.com>

zsh-completion: less forking in _systemctl_failed_units() and make the array `_sys_failed_units' local to the completer.

e4e868f3aeedccfe04c6b6c3be026c7f8873370a 18-May-2015 Eric Cook <llua@gmx.com>

zsh-completion: less forking in _systemctl_get_template_names()

fb869ca1d20e503708ae813c3d3ebcf5a5173c25 18-May-2015 Eric Cook <llua@gmx.com>

zsh-completion: actually complete template names for subcommands enable, reenable and disable. compadd's -a option treats non-option arguments as arrays. So $(_systemctl_get_template_names) expands to some words that aren't legal array names. Even if there were, they would be empty; thus adding nothing. deduplicated a few functions too.

67afa93148ca51eb1d37717ad3c3cac980be1c7a 18-May-2015 Eric Cook <llua@gmx.com>

zsh-completion: actually run _filter_units_by_property when creating the arrays _sys_(re|)startable_units

903e7c37caaaedf8ab0b6c664f4946cce369c0f0 18-May-2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

Use "new" --job-mode= option in more places --irreversible/--ignore-dependencies/--fail are deprececated since 4dc5b821ae737914499119e29811fc3346e3d97c. Also add shell completions for --jobs-mode.

7b742b3130941b5c8d5e178b6694428fb3b61086 08-Apr-2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

shell-completion: systemctl switch-root verb The completion is rudimentary (all files). I think this is OK since this is used so rarely. But not having it proposed at all is annoying.

5bdf22430e367799dfa66c724144b624c5479518 07-Apr-2015 Jan Janssen <medhefgo@web.de>

logind,systemctl: add reboot to EFI firmware support

e37b56c7355a9b84ac1e1893ab828b19aa1dc217 21-Jan-2015 Wieland Hoffmann <themineo@gmail.com>

zsh-completion: Do not interpret escape sequences in _filter_units_by_property This makes all functions that rely on _filter_units_by_property() (like _systemctl_{stop,kill,try_restart}) work with unit names that contain backslash escaped sequences (like automount units with spaces that are escaped to "\x20").

820aced6f6067a6b7c57b7d36e44f64378870cbf 10-Dec-2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

zsh-completion: remove duplicate function https://bugs.archlinux.org/task/43069

409886c424cfaeeb5cf8928905560e5cac2d492d 10-Dec-2014 Ronny Chevalier <chevalier.ronny@gmail.com>

shell-completion: systemctl edit

81333ecf9d5497f8aa95f7fec23c67b869d5abf9 30-Oct-2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

zsh-completion: update start/restart completions Now zsh should behave the same for those two subcommands as bash.

1cf3c30c0787f941b0f6d0b11ab504ddee3b0b8f 28-Oct-2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

shell-completion: systemctl set-default,get-default,is-system-running

e9a19bd882ff8a2c8aef5c63b39525ea231e5fb9 15-Oct-2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

shell-completion: propose templates for disable/[re]enable/[re]start Templates can be [re]enabled, on their own if the have DefaultInstance set, and with an instance suffix in all cases. Propose just the template name ending in @, to underline the instance suffix may have to be appended. Likewise for start/restart. This means that sometimes superflous units that one will not really want to operate on will be proposed, but this seems better than proposing a very incomplete set of names. https://bugs.freedesktop.org/show_bug.cgi?id=66912

f29c77bc0179b0fa57407dbe30b495be9f5ad2e8 15-Oct-2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

shell-completion: fix completion of inactive units Units which not loaded were not proposed properly. OTOH, we should filter units from get-unit-files by their state if they are currently loaded. Bring zsh completions in line with bash completion, the same logic should be used in both implementations. https://bugzilla.redhat.com/show_bug.cgi?id=1024379 https://bugzilla.redhat.com/show_bug.cgi?id=790768 https://bugs.freedesktop.org/show_bug.cgi?id=84720

6d314eca15f6cbda38d82774b210f784d3d4f52a 26-Jul-2014 Eric Cook <llua@gmx.com>

shell-completion: prevent mangling unit names Units with literal hex '\xFF' in their names has to be read and printed properly. dev-disk-byx2dlabel-root.device != dev-disk-by\x2dlabel-root.device

2c12a402cb1e8277c271ced8dc9c06d20b8f6017 22-Jul-2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

shell-completion: systemd-analyze verify, systemctl link Some zsh completion helpers were not installed, so completion was broken. Add systemd-analyze verify. Make systemctl link complete only unit names.

c0a67aef31bb9716617ffe150ca8be19c5df203e 15-Jul-2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

shell-completion: restore completion for -p It was broken since systemd was moved out of /bin. For zsh it was never there.