chiark / gitweb /
zsh-completion: _loginctl - general bug fixes
authorEric Cook <llua@gmx.com>
Wed, 17 Jun 2015 11:41:24 +0000 (07:41 -0400)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:03:03 +0000 (10:03 +0100)
commit5202b4c32abb1379ffe08d74a542d91f12490e54
tree889f6968a0c7b6877a4e0428b7091191bb8d689b
parenta4b49e45f7fb56d4456ef20b343105fa0dbda069
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.
shell-completion/zsh/_loginctl