]> git.ipfire.org Git - thirdparty/systemd.git/commit
zsh-completion: _loginctl - general bug fixes 248/head
authorEric Cook <llua@gmx.com>
Wed, 17 Jun 2015 11:41:24 +0000 (07:41 -0400)
committerEric Cook <llua@gmx.com>
Wed, 17 Jun 2015 11:41:24 +0000 (07:41 -0400)
commitb0fe29ff9e04d02d939ffca0b942cfb2a3494171
tree1b26bff57600ae73c521941428b7f1edb44e822b
parentc986cc70002cf8f28e6ea1e63da46a8124a0882c
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