Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: complete utmpx key for FreeBSD's getent
- X-seq: zsh-workers 44780
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: complete utmpx key for FreeBSD's getent
- Date: Thu, 26 Sep 2019 23:30:39 +0200
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1569533443; bh=aknu+F5GayxpVszxeBCWFBVIKSjlMVAlvNykLrpy8JA=; h=From:To:Subject:Date:From:Subject; b=HUxBCuM4P4HRqgpexrs53J+q0LTjcJA+hahZgYtHbGys33rduaDtcPoSxQV7gzMrm3vbJ1NNnVhHMhgxWry8HSWcoy7HKfJ2V5s9VsbP7TlNWyLw3EB9qMcJeIy/Xa9vkMvZi+Y0my4fG8cN2L/L0qvBRRciClfVNPJ0+EWjnTp2ZSSKSkva7+XxxA24478QUJgkAiXivgGpH7sxFeKrc0A//9bniInbjJqMIkWePKDdb7dbz6F95fBsjpeLNEWnt6ckQE73rrr+A7a7yvRkfP0/yYNzjvKnBudy4sBOaXgQm/eEzF1gbNYd9VHRoPeAa4/mCynccALujjAnHIN7Ow==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
;;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author