help / color / mirror / code / Atom feed
From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH: _login_class: Complete login.conf.d classes
Date: Tue, 15 Mar 2022 22:14:00 -0500	[thread overview]
Message-ID: <YjFV+O1Hkp9CyRPt@CptOrmolo.darkstar> (raw)

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

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 @@
+local expl login_classes
+if [[ $OSTYPE = openbsd* ]]; then
+  login_classes+=(/etc/login.conf.d/*(N:t))
 _description login-classes expl 'login class'
-compadd "$@" "$expl[@]" - ${${(M)${(f)"$(</etc/login.conf)"}:#[^#[:blank:]]*}%%[:|]*}
+compadd "$@" "$expl[@]" - $login_classes

                 reply	other threads:[~2022-03-16  3:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YjFV+O1Hkp9CyRPt@CptOrmolo.darkstar \
    --to=phy1729@gmail.com \
    --cc=zsh-workers@zsh.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).