#compdef system_profiler typeset -A opt_args local context state line local -a _data_types # TODO: Should this be static? Calling `system_profiler -listDataTypes` takes # about 0.07-0.08 sec. Does this list ever change (between different versions # of OS X)? _data_types=$(_call_program path system_profiler -listDataTypes 2>/dev/null) _arguments \ '(-listDataTypes -detailLevel -timeout -usage)-usage' \ '(-listDataTypes -usage)-xml[generate xml output]' \ '(-listDataTypes -xml -detailLevel -timeout -usage)-listDataTypes[lists the available datatypes]' \ '(-listDataTypes -usage)-detailLevel[level of detail for the report]:detail level:(mini basic full)' \ '(-listDataTypes -usage)-timeout+[maximum time to wait in seconds]' \ && return 0