[pulseaudio-tickets] [Bug 98639] zsh tab completion for pasuspender suggests -C (and other enhancements for pasuspender tab completion)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Nov 12 22:05:29 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=98639

--- Comment #2 from pseyfert at mathphys.fsk.uni-heidelberg.de ---
Urgh, I realized the function can be written easier, without the ugly shift
counting:

_pasuspender_completion() {
    # parenthesis expressions specify which options should not get suggested
afterwards
    # e.g. after -s, help and version will not get suggested, -- remains the
only valid argument
    # after "--" external commands get suggested
    _arguments -C \
        '(-)'{-h,--help}'[display help and exit]' \
        '(-)--version[show version and exit]' \
        '(-h --help --version -s --server)'{-s,--server=}'[name of server to
connect to]:host:_hosts' \
        '(-)--[program]:program: _command_names -e:*::program arguments:
_normal'
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20161112/c8a7a91e/attachment.html>


More information about the pulseaudio-bugs mailing list