Commit Graph

222 Commits

Author SHA1 Message Date
Alessandro Puccetti 2a624c36e6 doc,core: Read{Write,Only}Paths= and InaccessiblePaths=
This patch renames Read{Write,Only}Directories= and InaccessibleDirectories=
to Read{Write,Only}Paths= and InaccessiblePaths=, previous names are kept
as aliases but they are not advertised in the documentation.

Renamed variables:
`read_write_dirs` --> `read_write_paths`
`read_only_dirs` --> `read_only_paths`
`inaccessible_dirs` --> `inaccessible_paths`
2016-07-19 17:22:02 +02:00
ntzrmtthihu777 b010a6a1ae zsh-completion: fix option ordering in set-x11-keymap (#3646) 2016-07-15 04:59:45 -04:00
Alessandro Puccetti 14ca5c9cb4 nspawn-completion: implementation of shell completion of --notify-ready (#3679)
Relative to: https://github.com/systemd/systemd/pull/3474
2016-07-08 17:44:20 +02:00
Christian Rebischke b2bb19bbda machinectl: Added stop as alias for poweroff (#3406) 2016-06-06 17:06:20 +02:00
Zbigniew Jędrzejewski-Szmek ed1190498f tree-wide: remove uses of --failed
It has been replaced by --state=failed.
2016-05-08 20:27:33 -04:00
Felipe Sateler 673fca32be zsh-completion: remove non-portable uses of \s in awk (#3063) 2016-04-19 00:23:01 -04:00
Felipe Sateler c54318c66f Add zsh completion for networkctl (#3062) 2016-04-18 23:27:42 +02:00
Zbigniew Jędrzejewski-Szmek e81eb2874e systemd-resolve: initial shell completion
v2:
- use /sys/class/net to list interfaces,
  also copy the same code to systemd-nspawn
v3:
- do not propose "any" twice for --type
2016-02-18 11:50:53 -05:00
Daniel Mack 50f48ad37a cgroup: remove support for NetClass= directive
Support for net_cls.class_id through the NetClass= configuration directive
has been added in v227 in preparation for a per-unit packet filter mechanism.
However, it turns out the kernel people have decided to deprecate the net_cls
and net_prio controllers in v2. Tejun provides a comprehensive justification
for this in his commit, which has landed during the merge window for kernel
v4.5:

  https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bd1060a1d671

As we're aiming for full support for the v2 cgroup hierarchy, we can no
longer support this feature. Userspace tool such as nftables are moving over
to setting rules that are specific to the full cgroup path of a task, which
obsoletes these controllers anyway.

This commit removes support for tweaking details in the net_cls controller,
but keeps the NetClass= directive around for legacy compatibility reasons.
2016-02-10 16:38:56 +01:00
Zbigniew Jędrzejewski-Szmek 8cd095cc27 shell-completion: fix header 2016-02-06 17:54:48 -05:00
Lennart Poettering aabf5d4243 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.
2016-01-28 18:57:04 +01:00
Douglas Christman 655fd9d71f zsh-completion: Escape results for `journalctl --unit`
Escape colons and backslashes in unit names.
This gives correct completions for units with names like
    systemd-backlight@backlight:acpi_video0.service
and
    systemd-fsck@dev-disk-by\x2duuid-...
2016-01-25 18:10:31 -05:00
Lennart Poettering b43d75c378 importd: drop dkr support
The current code is not compatible with current dkr protocols anyway,
and dkr has a different focus ("microservices") than nspawn anyway
("whole machine containers"), hence drop support for it, we cannot
reasonably keep this up to date, and it creates the impression we'd
actually care for the microservices usecase.
2015-12-10 16:54:41 +01:00
Filipe Brandenburger b4c14404b3 execute: Add new PassEnvironment= directive
This directive allows passing environment variables from the system
manager to spawned services. Variables in the system manager can be set
inside a container by passing `--set-env=...` options to systemd-spawn.

Tested with an on-disk test.service unit. Tested using multiple variable
names on a single line, with an empty setting to clear the current list
of variables, with non-existing variables.

Tested using `systemd-run -p PassEnvironment=VARNAME` to confirm it
works with transient units.

Confirmed that `systemctl show` will display the PassEnvironment
settings.

Checked that man pages are generated correctly.

No regressions in `make check`.
2015-11-11 07:55:23 -08:00
Zbigniew Jędrzejewski-Szmek 36b4a7ba55 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
2015-11-10 19:33:06 -05:00
Evgeny Vereshchagin dcebcd7ade shell-completion: systemd-run: add the property RuntimeDirectory 2015-10-27 05:18:12 +03:00
Evgeny Vereshchagin 64fa5643df shell-completion: systemd-run: add the property ProtectHome 2015-10-26 00:22:34 +00:00
Zbigniew Jędrzejewski-Szmek 5ef80f3bbb zsh-completion: journalctl --identifier
Fixes #1549.
2015-10-25 10:49:19 -04:00
Evgeny Vereshchagin 4e79ac4425 shell-completion: systemd-run: add the property ProtectSystem 2015-10-24 22:49:46 +00:00
Nicolas Cornu 7e7cd2526d shell-completion: systemd-run: add new property EnvironmentFile 2015-10-21 16:18:59 +02:00
Nicolas Cornu 5ffd7671cc Add zsh completion on systemd-run's properties 2015-10-21 15:51:09 +02:00
Lennart Poettering b3ccac01cc zsh: don't mention /etc/mtab
The file is obsolete, use /proc/self/mounts instead.

Also, yuck, the code is so awful...
2015-10-09 17:20:32 +02:00
Zbigniew Jędrzejewski-Szmek 840b2c0e77 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.
2015-09-28 15:10:03 -04:00
Nicolas Cornu cade10ccef zsh completion: update busctl 2015-08-15 13:58:05 +02:00
Eric Cook fb9d85b71a zsh-completion: _loginctl/_systemd/_systemd-inhibit improvements
_loginctl: respects the verbose style. which allows a user to get
the pre d5df0d950f 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
2015-06-22 18:07:32 -04:00
Eric Cook 38cf1e292b zsh-completion: _systemd-nspawn - add more argument completion
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
2015-06-21 21:59:26 -04:00
Eric Cook b0fe29ff9e zsh-completion: _loginctl - general bug fixes
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.
2015-06-17 07:41:24 -04:00
Daniel Hahler a0ab162a09 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.
2015-06-06 12:54:41 +02:00
Daniel Mack d4cb023490 Merge pull request #5 from systemd-mailing-devs/1432910411-14517-1-git-send-email-llua@gmx.com
zsh-completion: a more style/tag aware _systemctl
2015-06-02 17:57:43 +02:00
Daniel Mack ad2274289b Merge pull request #4 from systemd-mailing-devs/1431989131-25145-1-git-send-email-llua@gmx.com
zsh-completion: fix completion of --user services
2015-06-02 17:43:29 +02:00
Daniel Mack c521a430fd zsh-completion: fix typo in _bootctl
The command is 'install', not 'instal'. Fix that typo.
2015-06-01 12:07:19 +02:00
Ronny Chevalier da090dfd0b zsh-completion: update bootctl 2015-05-30 11:19:35 +02:00
Eric Cook d34b7c117b 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
2015-05-29 17:04:09 +02:00
Eric Cook 68c4f6d406 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.
2015-05-19 01:01:40 +02:00
Eric Cook bf8864c2c0 zsh-completion: make the arrays _sys_active_units, _sys_startable_units and _sys_restartable_units local to the completer. 2015-05-18 05:22:09 -04:00
Eric Cook 2103d29d89 zsh-completion: removing more pointless forks
I seem to have forgot about _systemctl_active_units().
2015-05-18 05:22:09 -04:00
Eric Cook 463985a9f4 zsh-completion: less forking in _systemctl_failed_units() and make the array `_sys_failed_units' local to the completer. 2015-05-18 05:22:08 -04:00
Eric Cook e4e868f3ae zsh-completion: less forking in _systemctl_get_template_names() 2015-05-18 05:22:08 -04:00
Eric Cook fb869ca1d2 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.
2015-05-18 05:22:08 -04:00
Eric Cook 67afa93148 zsh-completion: actually run _filter_units_by_property when creating the arrays _sys_(re|)startable_units 2015-05-18 05:22:08 -04:00
Zbigniew Jędrzejewski-Szmek 903e7c37ca Use "new" --job-mode= option in more places
--irreversible/--ignore-dependencies/--fail are deprececated since 4dc5b821ae.

Also add shell completions for --jobs-mode.
2015-05-18 01:08:09 -04:00
Lukas Rusak 6b85708cfd zsh-completion: add missing completions for systemd-nspawn 2015-05-16 11:54:28 -04:00
Lukas Rusak b93f15cd05 zsh-completion: update -M completion for systemd-analyze 2015-05-16 11:54:28 -04:00
Lukas Rusak b3b9282d0c zsh-completion: add missing completions for machinectl
Appologies, I'm still getting used to this mailing list thing and using git send-email
2015-05-16 11:54:28 -04:00
Zbigniew Jędrzejewski-Szmek 7b742b3130 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.
2015-04-08 11:28:45 -04:00
Ronny Chevalier d67b1f525f zsh-completion: update hostnamectl 2015-04-08 02:42:50 +02:00
Ronny Chevalier b178d279d9 zsh-completion: add missing -M completion for journalctl 2015-04-08 02:42:50 +02:00
Ronny Chevalier 8470025541 zsh-completion: update loginctl 2015-04-08 02:42:50 +02:00
Jan Janssen 5bdf22430e logind,systemctl: add reboot to EFI firmware support 2015-04-07 18:51:45 +02:00
Torstein Husebø cc98b3025e treewide: fix multiple typos 2015-01-26 10:39:47 -05:00
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