File: _jls

package info (click to toggle)
zsh 5.9-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,856 kB
  • sloc: ansic: 108,138; sh: 6,976; makefile: 722; perl: 687; awk: 291; sed: 16
file content (19 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#compdef jls

local curcontext=$curcontext state state_descr line
typeset -A opt_args

_arguments -C -s -w -A '-*' : \
  '-d[include diying jails]' \
  '-h[print header line]' \
  "-N[print jail's name instead of numeric ID]" \
  '-n[print parameters in ``name=value'\'\'' format]' \
  '-q[quote parameter value when it contains whitespace, quotes or empty string]' \
  '-s[print parameters suitable for passing to jail(8)]' \
  '-v[print a multiple-line summary per jail]' \
  '-j[the jid or name of the jail to list]:jail:_jails' \
  '*: :->parameters'

if [[ $state == parameters ]]; then
  _values -w -S ' ' 'jail parameter' ${${${(f)"$(sysctl -N security.jail.param)"}%.#}##security.jail.param.#}
fi