* PATCH: _login_class: Complete login.conf.d classes
@ 2022-03-16 3:14 Matthew Martin
0 siblings, 0 replies; only message in thread
From: Matthew Martin @ 2022-03-16 3:14 UTC (permalink / raw)
To: zsh-workers
OpenBSD added the ability to define a login class by dropping a file in
/etc/login.conf.d/ . I also added a local expl which I think was just
forgotten.
diff --git a/Completion/BSD/Type/_login_classes b/Completion/BSD/Type/_login_classes
index 227e3c748..a2e6983a9 100644
--- a/Completion/BSD/Type/_login_classes
+++ b/Completion/BSD/Type/_login_classes
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-16 3:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 3:14 PATCH: _login_class: Complete login.conf.d classes Matthew Martin
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).