about summary refs log tree commit diff
path: root/Completion/Unix/Command/_last
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2017-10-29 13:42:53 +0100
committerOliver Kiddle <opk@zsh.org>2017-10-29 13:42:53 +0100
commit01523f41450d97ebf2bc2e57ed27af0b3524f222 (patch)
treee72fb9f881ca4ec77483787a9bca4c5bc6bd8b20 /Completion/Unix/Command/_last
parent85e56b5a48a2d83736fa367173fab4173551c8cf (diff)
downloadzsh-01523f41450d97ebf2bc2e57ed27af0b3524f222.tar.gz
zsh-01523f41450d97ebf2bc2e57ed27af0b3524f222.tar.xz
zsh-01523f41450d97ebf2bc2e57ed27af0b3524f222.zip
41958: update util-linux completions to 2.31; new hexdump completion
Diffstat (limited to 'Completion/Unix/Command/_last')
-rw-r--r--Completion/Unix/Command/_last42
1 files changed, 25 insertions, 17 deletions
diff --git a/Completion/Unix/Command/_last b/Completion/Unix/Command/_last
index f198e0fff..2013cc1c2 100644
--- a/Completion/Unix/Command/_last
+++ b/Completion/Unix/Command/_last
@@ -4,19 +4,20 @@ local pattern arg args ttys
 ttys=( /dev/tty*(N) /dev/pts/*(N) reboot )
 ttys=( ${ttys#/dev/} )
 
+[[ $OSTYPE = linux-gnu ]] || args=( -A "-*" )
 for pattern arg in \
-  '(solaris*|linux-gnu)' '-a[display hostname in last column]' \
-  '((free|net|open)bsd*|darwin*|dragonfly*|linux-gnu)' '-h[limit sessions by hostname]:host:_hosts' \
-  '((free|open)bsd*|linux-gnu)' '-s[report duration in seconds]' \
-  '(freebsd*|openbsd*)' '-d[limit sessions to those active at snapshot time]:time ([[CC]YY][MMDD]hhmm[.SS])' \
-  '((net|free|open)bsd*|darwin*|dragonfly*)' '-t[limit sessions by tty]:tty:_ttys -D' \
+  '(solaris*|linux-gnu)' '(--hostlast)-a[display hostname in last column]' \
+  '((free|net|open)bsd*|darwin*|dragonfly*)' '-h+[limit sessions by hostname]:host:_hosts' \
+  '((free|open)bsd*)' '-s[report duration in seconds]' \
+  '(freebsd*|openbsd*)' '-d+[limit sessions to those active at snapshot time]:time ([[CC]YY][MMDD]hhmm[.SS])' \
+  '((net|free|open)bsd*|darwin*|dragonfly*)' '-t+[limit sessions by tty]:tty:_ttys -D' \
   'openbsd*' '-c[calculate total time]' \
-  '^darwin*' '-f[specify account file]:file:_files' \
-  '(solaris*|linux-gnu|freebsd*|openbsd*)' '-n[specify number of lines to show]:number' \
+  '^darwin*' '(--file)-f+[specify account file]:file:_files' \
+  '(solaris*|linux-gnu|freebsd*|openbsd*)' '(--limit)-n+[specify number of lines to show]:number' \
   '((open|net)bsd*|dragonfly*)' '-T[show more detailed time information including year and seconds]' \
   'netbsd*' '-x[assume file is in wtmpx(5) format]' \
   'netbsd*' '-n[show IP of remote hosts]' \
-  'freebsd*' '-w[show seconds in durarion field]' \
+  'freebsd*' '-w[show seconds in duration field]' \
   'freebsd*' '-y[show year in session start time]'
 do
   [[ $OSTYPE = $~pattern ]] && args+=( $arg )
@@ -32,14 +33,21 @@ case $OSTYPE in
   ;;
   linux-gnu)
     args+=(
-      '-R[suppress display of hostname field]'
-      '-d[translate IP to hostname]'
-      '-F[show full login and logout times and dates]'
-      '-i[show IP of remote hosts]'
-      '-o[read old-format wtmp]'
-      '-t[limit sessions to those active at snapshot time]:time (YYYYMMDDhhmmss)'
-      '-w[show full user and domain names]'
-      '-x[display shutdown/runlevel entries]'
+      '(-a)--hostlast[display hostname in last column]'
+      '(-d --dns -i --ip)'{-d,--dns}'[translate IP to hostname]'
+      '(-f)--file=[specify account file]:file:_files'
+      '(-F --fulltimes)'{-F,--fulltimes}'[show full login and logout times and dates]'
+      '(-i --ip -d --dns)'{-i,--ip}'[show IP of remote hosts]'
+      '(-n)--limit=[specify number of lines to show]:number'
+      '(-R --nohostname)'{-R,--nohostname}'[suppress display of hostname field]'
+      '(-s --since)'{-s+,--since=}'[display lines since the specified time]:time (YYYYMMDDhhmmss)'
+      '(-t --until)'{-t+,--until=}'[display lines until the specified time]:time (YYYYMMDDhhmmss)'
+      '(-p --present)'{-p+,--present=}'[display who were present at the specified time]:time (YYYYMMDDhhmmss)'
+      '(-w --fullnames)'{-w,--fullnames}'[show full user and domain names]'
+      '(-x --system)'{-x,--system}'[display shutdown/runlevel entries]'
+      '--time-format=[show timestamps in the specified format]:format:(notime short full iso)'
+      '(- *)'{-h,--help}'[display usage information]'
+      '(- *)'{-V,--version}'[display version information]'
     )
   ;;
 esac
@@ -50,4 +58,4 @@ else
   args+=( '*:user:_users' )
 fi
 
-_arguments -s $args
+_arguments -s -S $args