Commit graph

9 commits

Author SHA1 Message Date
Arthur Zamarin 5db2bf1b30
shell-completion: add missing args to zsh resolvectl
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-05-01 19:17:59 +03:00
Eisuke Kawashima 20927c0eec
improve zsh completion (#32098)
* fix error
* remove options that are no longer supported
* add missing options
* stop completion if an option `--help` or `--version` is supplied

[[[
zjs: a note for the reader:

zshcompsys(1) in the section about optspecs in _arguments says:

> Each of the forms above may be preceded by a list in parentheses of option names  and  argument  num‐
> bers.  If the given option is on the command line, the options and arguments indicated in parentheses
> will not be offered.  For example, ‘(-two -three 1)-one:...' completes the option ‘-one'; if this ap‐
> pears  on  the  command line, the options -two and -three and the first ordinary argument will not be
> completed after it.  ‘(-foo):...' specifies an ordinary argument completion; -foo will  not  be  com‐
> pleted if that argument is already present.
> 
> Other  items  may  appear in the list of excluded options to indicate various other items that should
> not be applied when the current specification is matched: a single star (\*) for  the  rest  arguments
> (i.e. a specification of the form ‘\*:...'); a colon (:) for all normal (non-option-) arguments; and a
> hyphen (-) for all options.  For example, if ‘(\*)' appears before an option and the option appears on
> the  command  line,  the  list  of remaining arguments (those shown in the above table beginning with
> ‘\*:') will not be completed.

The intended effect of the change is to remove irrelevant completion matches from the completion.

tl;dr: (- : ) prevents further completion
]]]
2024-04-15 10:58:48 +02:00
Christian Hesse 77d4986415 shell-completion/zsh/resolvectl: add show-cache
Make zsh shell-completion aware of show-cache.
2023-07-07 14:05:11 +02:00
Michael Biebl 85fce6f42c Use https for gnu.org 2022-06-28 16:07:35 +02:00
Eric Cook 682e043c42 shell-completion: revert c1072f6473
fixing https://github.com/systemd/systemd/issues/19689
2021-06-17 14:42:46 +02:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
codicodi d0192e93f8 Update resolvectl zsh completion 2020-05-21 14:06:58 +02:00
Ronan Pigott 24c55b6767 shell-completion: add resolvectl commands to zsh completion 2019-08-06 22:50:06 -07:00
Ronan Pigott f65ccde2c1 shell-completion: enable resolvectl zsh completion 2019-08-06 22:49:44 -07:00
Renamed from shell-completion/zsh/_systemd-resolve (Browse further)