zsh-workers
 help / Atom feed
* PATCH: complete utmpx key for FreeBSD's getent
@ 2019-09-26 21:30 Oliver Kiddle
  0 siblings, 0 replies; 1+ messages in thread
From: Oliver Kiddle @ 2019-09-26 21:30 UTC (permalink / raw)
  To: Zsh workers

This adds completion to getent for the utmpx key on FreeBSD.

Oliver

diff --git a/Completion/Unix/Command/_getent b/Completion/Unix/Command/_getent
index 0fb9a0af4..b96852db3 100644
--- a/Completion/Unix/Command/_getent
+++ b/Completion/Unix/Command/_getent
@@ -50,6 +50,13 @@ case $state in
       aliases|passwd|shadow|group)
         _wanted keys expl key compadd ${keys%%:*} && ret=0
       ;;
+      utmpx)
+	if (( CURRENT > 3 )); then
+	  _files && ret=0
+	else
+	  _wanted keys expl key compadd active lastlogin log && ret=0
+	fi
+      ;;
       *) _message -e keys key;;
     esac
   ;;

^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26 21:30 PATCH: complete utmpx key for FreeBSD's getent Oliver Kiddle

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/ public-inbox