summaryrefslogtreecommitdiff
path: root/shell-completion/zsh/_systemctl.in
AgeCommit message (Collapse)Author
2015-11-10Remove snapshot unit typeZbigniew Jędrzejewski-Szmek
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
2015-09-28shell-completion: use systemctl --state=helpZbigniew Jędrzejewski-Szmek
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.
2015-06-06zsh-completion: optimize _filter_units_by_propertyDaniel Hahler
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.
2015-06-02Merge pull request #5 from ↵Daniel Mack
systemd-mailing-devs/1432910411-14517-1-git-send-email-llua@gmx.com zsh-completion: a more style/tag aware _systemctl
2015-05-29zsh-completion: a more style/tag aware _systemctlEric Cook
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
2015-05-19zsh-completion: fix completion of --user servicesEric Cook
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.
2015-05-18zsh-completion: make the arrays _sys_active_units, _sys_startable_units and ↵Eric Cook
_sys_restartable_units local to the completer.
2015-05-18zsh-completion: removing more pointless forksEric Cook
I seem to have forgot about _systemctl_active_units().
2015-05-18zsh-completion: less forking in _systemctl_failed_units() and make the array ↵Eric Cook
`_sys_failed_units' local to the completer.
2015-05-18zsh-completion: less forking in _systemctl_get_template_names()Eric Cook
2015-05-18zsh-completion: actually complete template names for subcommands enable, ↵Eric Cook
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.
2015-05-18zsh-completion: actually run _filter_units_by_property when creating the ↵Eric Cook
arrays _sys_(re|)startable_units
2015-05-18Use "new" --job-mode= option in more placesZbigniew Jędrzejewski-Szmek
--irreversible/--ignore-dependencies/--fail are deprececated since 4dc5b821ae737914499119e29811fc3346e3d97c. Also add shell completions for --jobs-mode.
2015-04-08shell-completion: systemctl switch-root verbZbigniew Jędrzejewski-Szmek
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.
2015-04-07logind,systemctl: add reboot to EFI firmware supportJan Janssen
2015-01-21zsh-completion: Do not interpret escape sequences in _filter_units_by_propertyWieland Hoffmann
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").
2014-12-10zsh-completion: remove duplicate functionsystemd/v218Zbigniew Jędrzejewski-Szmek
https://bugs.archlinux.org/task/43069
2014-12-10shell-completion: systemctl editRonny Chevalier
2014-10-29zsh-completion: update start/restart completionsZbigniew Jędrzejewski-Szmek
Now zsh should behave the same for those two subcommands as bash.
2014-10-27shell-completion: systemctl set-default,get-default,is-system-runningZbigniew Jędrzejewski-Szmek
2014-10-14shell-completion: propose templates for disable/[re]enable/[re]startZbigniew Jędrzejewski-Szmek
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
2014-10-14shell-completion: fix completion of inactive unitsZbigniew Jędrzejewski-Szmek
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
2014-07-26shell-completion: prevent mangling unit namesEric Cook
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
2014-07-21shell-completion: systemd-analyze verify, systemctl linkZbigniew Jędrzejewski-Szmek
Some zsh completion helpers were not installed, so completion was broken. Add systemd-analyze verify. Make systemctl link complete only unit names.
2014-07-15shell-completion: restore completion for -pZbigniew Jędrzejewski-Szmek
It was broken since systemd was moved out of /bin. For zsh it was never there.