about summary refs log tree commit diff
path: root/Completion/Unix/Command/_dmesg
blob: 3dd0592146b168d8a64434074a093b31cb8b6f9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#compdef dmesg

local args

case $OSTYPE in
  linux*) args=( -S --  ) ;;
  darwin*|dragonfly*|*bsd*)
    args=(
      '-M[extract values from core]:core file:_files'
      '-N[extract name list from kernel image]:system:_files'
    )
  ;|
  dragonfly*|freebsd*)
    args=(
      '-a[show all data, including syslog and console]'
      '-c[clear the buffer after printing]'
    )
  ;|
  openbsd*)
    args+=(
      '-s[show console message buffer instead]'
    )
  ;;
  dragonfly*)
    args+=(
      '\*-f[follow buffer, displaying new data as it arrives]'
      '-n[use specified kernel core]:number'
    )
  ;;
esac

_arguments -s $args