Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: complete utmpx key for FreeBSD's getent



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