mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
49851: _login_class: Complete login.conf.d classes
This commit is contained in:
parent
87d276346f
commit
8dd733dfd2
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2022-03-18 Matthew Martin <phy1729@gmail.com>
|
||||
|
||||
* 49851: Completion/BSD/Type/_login_classes: Complete
|
||||
login.conf.d classes.
|
||||
|
||||
2022-03-13 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 49844: Doc/Zsh/expn.yo, Doc/Zsh/zle.yo: Fix node reference
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
#autoload
|
||||
|
||||
local expl login_classes
|
||||
|
||||
login_classes=(${${(M)${(f)"$(</etc/login.conf)"}:#[^#[:blank:]]*}%%[:|]*})
|
||||
if [[ $OSTYPE = openbsd* ]]; then
|
||||
login_classes+=(/etc/login.conf.d/*(N:t))
|
||||
fi
|
||||
|
||||
_description login-classes expl 'login class'
|
||||
compadd "$@" "$expl[@]" - ${${(M)${(f)"$(</etc/login.conf)"}:#[^#[:blank:]]*}%%[:|]*}
|
||||
compadd "$@" "$expl[@]" - $login_classes
|
||||
|
|
Loading…
Reference in a new issue