about summary refs log tree commit diff
path: root/Completion/Darwin/Command/_system_profiler
blob: 0fd8b473bc3d03140521f08029e31735c46395d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#compdef system_profiler

typeset -A opt_args
local context state state_descr line
local -a _data_types

_data_types=( ${${(f)"$(_call_program data-types system_profiler -listDataTypes 2>/dev/null)"}[2,-1]} )

_arguments \
  '(- *)-usage' \
  '(- *)-listDataTypes[lists the available datatypes]' \
  '(-listDataTypes -usage -json)-xml[generate xml output]' \
  '(-listDataTypes -usage -xml)-json[generate json output]' \
  '(-listDataTypes -usage)-detailLevel[level of detail for the report]:detail level:(mini basic full)' \
  '(-listDataTypes -usage)-timeout+[maximum time to wait in seconds(0 means no timeout)]:timeout seconds' \
  '(-listDataTypes -usage)*:data type:'"($_data_types)"