Commit graph

182 commits

Author SHA1 Message Date
Seth Jennings 4acd40613f shell-completion: bash: make list-transfers and cancel-transfer STANDALONE
list-transfers and cancel-transfers don't take machine arguments.
2015-08-18 13:22:42 -05:00
Seth Jennings 2977883de2 shell-completion: bash: add image transfer subcommands 2015-08-18 13:20:12 -05:00
Lennart Poettering 7b0991c617 Merge pull request #931 from spartacus06/update-completion-machinectl
Update shell completion for machinectl
2015-08-16 19:58:49 +02:00
Seth Jennings 4f8f4c310c shell-completion: use list-images rather than list
"machinectl list" only lists running machines while many of the MACHINES
commands use names of images; both running and non-running.

List machines from both "list" and "list-images" and use sort -u to
avoid duplicates.
2015-08-16 11:20:21 -05:00
Seth Jennings 6eb8bec62d shell-completion: update machinectl bash completion
Many new subcommands have been added since the bash completion was last
updated.  Bring it up to speed.
2015-08-16 11:19:36 -05:00
Lennart Poettering 9c75b2538a Merge pull request #947 from evverx/bash-completion
Update bash-completion: generate all unit types
2015-08-16 17:04:57 +02:00
Evgeny Vereshchagin adb0c25eb6 bash-completion: generate unit type list from systemctl -t help option 2015-08-16 14:53:21 +00: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
Carlos Morata Castillo b4f91f2ba3 Updates in bash autocompletions
Hi,

I did ./check-undocumented.sh -b (my script just submitted) and checked
the results.

Cheers.
2015-01-29 00:44:30 -05: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
Carlos Morata Castillo 8c5463585d bash-completion: systemd-nspawn update
*Autocompletion for dirs, doesn't leave until you press space.
*Added tmpfs, volatile and network-macvlan options.

I tried with the SELinux options with seinfo(setools-console), but too
messy to get it right. Even Daniel Walsh haven't done it yet. :)
2015-01-08 16:33:59 -05:00
Lennart Poettering e275f5e204 shell-completion: add full support for completing busctl command lines, with services, objects, interfaces, members, and signatures 2014-12-23 22:44:32 +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 372b221166 bash-completion: use improved filtering to make things faster 2014-10-29 23:48:10 -04:00