Commit Graph

222 Commits

Author SHA1 Message Date
Wieland Hoffmann e37b56c735 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").
2015-01-21 10:59:40 +01:00
Moez Bouhlel d31f44e281 fix zsh completion typo
json-see => json-sse
2015-01-15 00:57:45 +01:00
Ronny Chevalier ee14023fd5 zsh-completion: add missing completions for systemd-tmpfiles 2015-01-12 22:19:34 +01:00
Ronny Chevalier a80cea6861 zsh-completion: add missing completions for systemd-run 2015-01-12 22:13:33 +01:00
Ronny Chevalier 26bd71f06c zsh-completion: add missing completions for systemd-analyze 2015-01-12 22:13:18 +01:00
Ronny Chevalier c285cb5c55 zsh-completion: add missing -M completion for timedatectl 2015-01-12 21:31:45 +01:00
Ronny Chevalier 720e0be0f0 zsh-completion: add missing completions for coredumpctl 2015-01-12 21:26:27 +01:00
Ronny Chevalier e4e5a85f34 shell-completion: add missing output modes
https://bugs.freedesktop.org/show_bug.cgi?id=88216
2015-01-09 13:53:23 +01:00
Zbigniew Jędrzejewski-Szmek 820aced6f6 zsh-completion: remove duplicate function
https://bugs.archlinux.org/task/43069
2014-12-10 17:34:56 -05:00
Ronny Chevalier 409886c424 shell-completion: systemctl edit 2014-12-10 01:10:01 +01:00
Lennart Poettering 25fa306ed5 hostnamed: introduce new "embedded" chassis type
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.
2014-11-06 14:37:12 +01:00
Zbigniew Jędrzejewski-Szmek 81333ecf9d zsh-completion: update start/restart completions
Now zsh should behave the same for those two subcommands as bash.
2014-10-29 23:48:10 -04:00
Zbigniew Jędrzejewski-Szmek 1cf3c30c07 shell-completion: systemctl set-default,get-default,is-system-running 2014-10-27 22:34:28 -04:00
Zbigniew Jędrzejewski-Szmek e9a19bd882 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
2014-10-14 21:20:05 -04:00
Zbigniew Jędrzejewski-Szmek f29c77bc01 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
2014-10-14 21:18:42 -04:00
Eric Cook c2026f28bd shell-completion(zsh): journalctl's -b changes
removed pointless index sort of bootids.
use `compadd -a' to add each array, instead of expanding possibly hundreds of words needlessly.
optional completion of -b
2014-09-27 19:57:04 +02:00
Daniel Buch d6bc8348d5 readahead: wipe out readahead 2014-09-25 16:39:18 +02:00
Eric Cook 6d314eca15 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
2014-07-26 15:08:41 -04:00
Zbigniew Jędrzejewski-Szmek 2c12a402cb 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.
2014-07-21 22:33:51 -04:00
Zbigniew Jędrzejewski-Szmek c0a67aef31 shell-completion: restore completion for -p
It was broken since systemd was moved out of /bin.

For zsh it was never there.
2014-07-15 10:06:12 -04:00
Zbigniew Jędrzejewski-Szmek ccb03ac39d shell-completion: add hostnamectl set-deployment 2014-07-11 09:22:01 -04:00
Zbigniew Jędrzejewski-Szmek 1ed7749564 shell-completion,man: beef up chassis completions and description
Parameters to hostnamectl command are not optional and should not be marked
as such in the man page.
2014-07-11 09:22:00 -04:00
Lennart Poettering f4bab1690e coredump: coredumpctl is so useful now, make it a first-class citizen
Drop the "systemd-" prefix, renaming it from "systemd-coredumpctl" to
"coredumpctl".
2014-06-19 13:46:01 +02:00
Daniel Mack 4433c995c7 completions: fix/augment zsh completions for systemd-nspawn, busctl, loginctl, hostnamectl, localectl, machinectl 2014-03-25 23:05:03 +01:00
Wieland Hoffmann 3a450ec5c6 _sd_machines: Use machinectl --no-legend
Otherwise bogus entries from the header and footer would show up in the
completion list.
2014-03-15 00:32:06 -04:00
Lennart Poettering 538b08707a build-sys: add missing makefile symlinks 2014-02-26 02:19:28 +01:00
Jason St. John 90e633a790 replace tabs with spaces in some files
Files:
* hwdb/60-keyboard.hwdb
* shell-completion/zsh/_systemd-coredumpctl
* src/test/test-helper.h
2014-02-21 03:50:12 +01:00
Tom Gundersen d72143bad4 zsh-completions: kernel-install - only show existing kernels for 'remove'
When we remove a kernel, we don't remove the modules, so don't look at the modules directory to find installed kernels.
2014-02-07 15:48:35 +01:00
Zbigniew Jędrzejewski-Szmek 627a98d398 shell-completion: fix completion of localectl set-locale
https://bugs.freedesktop.org/show_bug.cgi?id=74157
2014-02-06 12:01:39 -05:00
Lukas Nykryn f89a4474e0 shell-completion: remove load from systemctl 2014-01-15 15:31:07 +01:00
Zbigniew Jędrzejewski-Szmek 841aa8c0b4 loginctl,shell-completions: fix listing of sessions/users/seats 2013-12-21 18:35:27 -05:00
Jason St. John c736283bfb journalctl,zsh-completion: fix several issues in --help message text
-- fix grammar and reword some descriptions for clarity
-- add a useful description of what --follow does
-- fix the description for --after-cursor
-- properly introduce the FSS acronym for "Forward Secure Sealing" in
both sections
-- clarify the --disk-usage command

[zj: perform similar changes to zsh completions]

squash! journalctl: fix several issues in --help message text
2013-12-18 23:58:24 -05:00
Zbigniew Jędrzejewski-Szmek 86cb0691b7 shell-completion: busctl 2013-12-05 21:33:08 -05:00
Zbigniew Jędrzejewski-Szmek 6da49b8b2f shell-completion: systemctl cat
Also update -H help string to follow the binaries.
2013-11-30 22:36:08 -05:00
Marko Myllynen 51d0f1c9f6 zsh-completion: add bootctl 2013-11-13 23:02:23 -05:00
Dave Reisner d181115929 shell: add list-timers to systemctl completions 2013-11-11 11:04:06 -05:00
William Giokas c0fd7cbd7a zsh-completion: Move machine listing to autoload
Instead of having two different listings of machines, use an autoloaded
function that can be used by other shell completions in the future. It
will also allow editing a single file to change the way machinectl and
systemd-run completion for machines.
2013-11-09 19:02:53 -05:00
William Giokas a02c5fe7cb zsh-completion: Move output modes to autoload 2013-11-09 19:02:53 -05:00
Ronny Chevalier f49e8bc472 zsh-completion: add missing options for systemd-run 2013-11-07 01:23:54 -05:00
Ronny Chevalier d74ab85216 zsh-completion: add systemd-run 2013-10-30 22:45:18 -04:00
Tom Gundersen 0b99c9f8f0 udev: builtin - rename net_link to net_setup_link
Also add shell completions.
2013-10-29 14:17:57 +01:00
Zbigniew Jędrzejewski-Szmek f11880744c journalctl: add --list-boots to show boot IDs and times
Suggested by David Wilkins <dwilkins@maths.tcd.ie> in
https://bugzilla.redhat.com/show_bug.cgi?id=967521:

> [Specific boot ID is a] bit of a palaver to obtain.  I consulted the
> verbose dump of the journal to discover the _BOOT_ID for the
> timestamp, and then generated the journal dump for that boot using
> journalctl _BOOT_ID=foo -o short-monotonic.
2013-10-28 23:43:57 -04:00
Zbigniew Jędrzejewski-Szmek 299c397c12 shell-completion: dump has moved to systemd-analyze
Rename NO_OPTION to STANDALONE for consistency with other files.
2013-10-21 18:53:57 -04:00
Dave Reisner d808ca6414 completion/systemctl: add missing list-sockets verb 2013-09-20 14:48:43 -04:00
Zbigniew Jędrzejewski-Szmek fe05567c31 shell-completions: systemd-analyze set-log-level 2013-08-28 08:04:56 -04:00
William Giokas 9e15a18acd zsh_completion: Fix --user-unit completion
_SYSTEMD_USER_UNIT in the --user-unit flag argument should instead be
USER_UNIT. It should also have an optional `=` between the flag and the
argument.
2013-08-24 13:17:43 -04:00
William Giokas 862f4963c6 zsh_completion: Fix single letter args
Things like -n to specify the lines to show with systemctl and
journalctl accepts syntax like:

  journalctl -n4
  systemctl -n14

Previously, typing `-nXX <tab>` where XX is a number, zsh would try to
complete an integer. Now it will see the XX and use the _journalctl_none
completion. This is also how any of the single letter options that take
arguments work as well.
2013-08-23 12:48:14 -04:00
William Giokas 24a0282324 zsh_completion: Remove ctls function from _systemd
The _ctls function in the main _systemd file is not needed.
2013-08-15 11:29:09 -04:00
William Giokas 789b904a45 zsh_completion: machinectl properties can be stacked 2013-08-15 11:29:09 -04:00
William Giokas 298b9e23a6 zsh_completion: Allow specifying multiple arguments
Some of the options in systemd can take multiple arguments, such as
systemctl's --type option. Previously, you would only be able to
complete a single type after the -t, but now zsh will continue to
complete the types, separating them by commas.

systemd-inhibit's --what command has colon (:), and that has been taken
into account.
2013-08-15 11:29:08 -04:00
William Giokas 3e7f60ab32 zsh_completion: Move helper function to autoload
_hosts_or_user_at_host was used by 6 different completions, and
previously was in all 6 of those files. I moved it out to its own file,
_sd_hosts_or_user_at_host. This will be autoloaded for use in other
completion functions. It also allows external completions to use this
function by simply calling _sd_hosts_or_user_at_host as in the systemd
completions.
2013-08-14 22:42:56 -04:00
William Giokas ca08063781 zsh_completion: Correctly display journal fields
Show equals and field values when used with _journal_none, don't show
anything if we're not using _journal_none.
2013-08-14 22:23:08 -04:00
Zbigniew Jędrzejewski-Szmek 631c922c68 shell-completion: tell bash about --state 2013-08-12 12:04:49 -04:00
Daniel Wallace 7eb942c408 zsh completion: add _kernel-install 2013-08-03 09:20:12 -04:00
Zbigniew Jędrzejewski-Szmek a217fdc98e zsh_completion: add "gdb" verb to coredumpctl 2013-08-02 10:49:07 -04:00
William Giokas 4af6e458e5 zsh_completion: Speed up noncached perf of _journalctl
Splitting things unnecessarily at newlines causes tab completion to take
an extremely long time. Also add a note saying that caching is not good
for journalctl's completion.
2013-08-02 10:44:24 -04:00
William Giokas 1272ff850a zsh_completion: Split out zsh _systemd-tmpfiles
You can choose to have systemd-tmpfiles at configuration time, so only
install the completion for this if configured to do so.
2013-08-02 10:44:14 -04:00
William Giokas 4a8fa99069 zsh_completion: Fix journalctl's --boot
Actually displays a list of boot ID's and offsets to the user
2013-08-02 10:44:10 -04:00
William Giokas c51fa9dd4e zsh_completion: Remove unused functions 2013-08-02 10:44:07 -04:00
William Giokas 439b7ce868 zsh_completion: Split out zsh _machinectl 2013-08-02 10:44:03 -04:00
William Giokas 7abfbe7903 zsh_completion: Split out zsh _systemd-analyze 2013-08-02 10:43:58 -04:00
William Giokas 67e654f830 zsh_completion: Split out zsh _systemd-inhibit 2013-08-02 10:43:55 -04:00
William Giokas 30fd4d1eb1 zsh_completion: Split out zsh _systemd-nspawn
Also fix the random lack of completion
2013-08-02 10:43:52 -04:00
William Giokas a06225fcc1 zsh_completion: Split out zsh _udevadm 2013-08-02 10:43:49 -04:00
William Giokas 20c8382ba7 zsh_completion: Split out zsh _timedatectl 2013-08-02 10:43:46 -04:00
William Giokas 70e104c4e3 zsh_completion: Split out zsh _coredumpctl 2013-08-02 10:43:42 -04:00
William Giokas c4c12f133e zsh_completion: Split out zsh _localectl 2013-08-02 10:43:39 -04:00
William Giokas 7e83c0e03f zsh_completion: Split out zsh _journalctl
Re-ordered some of the options and added a few that were missing
previously as well.
2013-08-02 10:43:35 -04:00
William Giokas db456cd0c6 zsh_completion: Split out zsh _hostnamectl 2013-08-02 10:43:31 -04:00
William Giokas 799d54be0b zsh_completion: Split out zsh _loginctl 2013-08-02 10:43:27 -04:00
William Giokas ff7a0685a9 zsh_completion: Split out zsh _systemctl 2013-08-02 10:43:22 -04:00
William Giokas 4f87c47b35 zsh_completion: fix zsh completion installation
Moved zsh shell completion to shell-completion/zsh/_systemd for
automake's sake. Also allow users to specify where the files should go
with::

  ./configure --with-zshcompletiondir=/path/to/some/where

and by default going to `$datadir/zsh/site-functions`
2013-08-02 10:43:08 -04:00