Age | Commit message (Collapse) | Author |
|
|
|
|
|
Fixes #1549.
|
|
|
|
|
|
|
|
The file is obsolete, use /proc/self/mounts instead.
Also, yuck, the code is so awful...
|
|
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.
|
|
|
|
_loginctl: respects the verbose style. which allows a user to get
the pre d5df0d950f8bc behavior of not showing a description for sessions
and users, by default they aren't shown.
zstyle ':completion:*' verbose true
or
zstyle ':completion:*:loginctl*:*' verbose true # or similar
Will show the descriptions.
zstyle ':completion:*' verbose true
and
zstyle ':completion:*:loginctl*:*' verbose false # or similar
Won't show descriptions for loginctl only
_systemd: complete pids for systemd-notify's --pid option.
display a message of the expected argument for other options.
_systemd-inhibit: complete block & delay for --mode
display a message of the expected argument for --who/--why
|
|
filenames will be completed for --image/-i/--bind/--bind-ro/--tmpfs
network interfaces for --network-(interface|macvlan|ipvlan|bridge)
users for --user/-u, yes & no for --register, x86 * x86-64 for
--personality
display a message of the expected argument for --machine/-M/--uuid
--slice/-S/--port/-p/--selinux-*/-Z/-L/--setenv
Allow completing commands(and their options) of the host system for COMMAND
|
|
1) the iterator `fun' has an local scope. after running the completer,
it will no longer be defined.
2) use _describe instead of calling compadd. Using compadd without
calling _description or something similar before, restricts the
user's ability to customize what is presented to them.
zstyle ':completion:*' format 'Completing %d'
- now displays an header showing what is being completed.
zstyle ':completion::complete:loginctl-*::users' users user1 user2
- allows the user to manually specify which users is offered
zstyle :completion::complete:loginctl-kill-user:\* \
ignored-patterns '(100<0-4>|user1)'
- selectively ignore some users when completing loginctl kill-user
<tab>
Sessions, UIDs now have descriptions when selecting them.
3) removed the call to _loginctl_all_seats in _loginctl_attach(), since
_loginctl_seats calls it a second time, right before adding matches.
There isn't a noticeable difference doing this.
|
|
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.
|
|
systemd-mailing-devs/1432910411-14517-1-git-send-email-llua@gmx.com
zsh-completion: a more style/tag aware _systemctl
|
|
systemd-mailing-devs/1431989131-25145-1-git-send-email-llua@gmx.com
zsh-completion: fix completion of --user services
|
|
The command is 'install', not 'instal'. Fix that typo.
|
|
|
|
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
|
|
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.
|
|
_sys_restartable_units local to the completer.
|
|
I seem to have forgot about _systemctl_active_units().
|
|
`_sys_failed_units' local to the completer.
|
|
|
|
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.
|
|
arrays _sys_(re|)startable_units
|
|
--irreversible/--ignore-dependencies/--fail are deprececated since 4dc5b821ae737914499119e29811fc3346e3d97c.
Also add shell completions for --jobs-mode.
|
|
|
|
|
|
Appologies, I'm still getting used to this mailing list thing and using git send-email
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
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").
|
|
json-see => json-sse
|
|
|
|
|
|
|
|
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=88216
|
|
https://bugs.archlinux.org/task/43069
|
|
|
|
We really don't want to get lost in adding fridge, car, plane, drone, or
whatever else, hence add a generic term "embedded" cover all the cases
where the computer is just part of something bigger, and not at the
focus of things.
|
|
Now zsh should behave the same for those two subcommands as bash.
|
|
|
|
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
|
|
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
|