Blame completions/_nvme

Packit Service b7b338
#compdef _nvme nvme
Packit Service b7b338
Packit Service b7b338
# zsh completions for the nvme command-line interface,
Packit Service b7b338
# very loosely based on git and adb command completion
Packit Service b7b338
# Kelly Kaoudis kelly.n.kaoudis at intel.com, June 2015
Packit Service b7b338
Packit Service b7b338
_nvme () {
Packit Service b7b338
	local -a _cmds
Packit Service b7b338
	_cmds=(
Packit Service b7b338
	'id-ctrl:display information about the controller'
Packit Service b7b338
	'id-ns:display information about the namespace'
Packit Service b7b338
	'list-ns:identify all namespace(s) attached'
Packit Service b7b338
	'create-ns:create a new namespace before attachment'
Packit Service b7b338
	'delete-ns:delete a detached namespace'
Packit Service b7b338
	'attach-ns:attach namespace to controller'
Packit Service b7b338
	'detach-ns:detach namespace from controller'
Packit Service b7b338
	'list-ctrl:identify all controller(s) attached'
Packit Service b7b338
	'get-ns-id:get namespace id of opened block device'
Packit Service b7b338
	'get-log:retrieve any log in raw format'
Packit Service b7b338
	'fw-log:retrieve fw log'
Packit Service b7b338
	'smart-log:retrieve SMART log'
Packit Service b7b338
	'smart-log-add:retrieve additional SMART log'
Packit Service b7b338
	'error-log:retrieve error log'
Packit Service b7b338
	'get-feature:display a controller feature'
Packit Service b7b338
	'set-feature:set a controller feature and show results'
Packit Service b7b338
	'format:apply new block format to namespace'
Packit Service b7b338
	'fw-activate:activate a firmware on the device'
Packit Service b7b338
	'fw-download:download a firmware to the device'
Packit Service b7b338
	'admin-passthru:submit a passthrough IOCTL'
Packit Service b7b338
	'io-passthru:submit a passthrough IOCTL'
Packit Service b7b338
	'security-send:send security/secure data to controller'
Packit Service b7b338
	'security-recv:ask for security/secure data from controller'
Packit Service b7b338
	'resv-acquire:acquire reservation on a namespace'
Packit Service b7b338
	'resv-register:register reservation on a namespace'
Packit Service b7b338
	'resv-release:release reservation on a namespace'
Packit Service b7b338
	'resv-report:report reservation on a namespace'
Packit Service b7b338
	'flush:submit a flush'
Packit Service b7b338
	'compare:compare data on device to data elsewhere'
Packit Service b7b338
	'read:submit a read command'
Packit Service b7b338
	'write:submit a write command'
Packit Service b7b338
	'show-regs:shows the controller registers; requires admin character device'
Packit Service b7b338
	'help:print brief descriptions of all nvme commands'
Packit Service b7b338
	)
Packit Service b7b338
Packit Service b7b338
	local expl
Packit Service b7b338
Packit Service b7b338
	_arguments '*:: :->subcmds' && return 0
Packit Service b7b338
Packit Service b7b338
	if (( CURRENT == 1 )); then
Packit Service b7b338
		_describe -t commands "nvme subcommands" _cmds
Packit Service b7b338
		return
Packit Service b7b338
	else
Packit Service b7b338
		case ${words[CURRENT-1]} in
Packit Service b7b338
		(id-ctrl)
Packit Service b7b338
			local _idctrl
Packit Service b7b338
			_idctrl=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--raw-binary':dump infos in binary format'
Packit Service b7b338
			-b':alias of --raw-binary'
Packit Service b7b338
			--human-readable':show infos in readable format'
Packit Service b7b338
			-H':alias of --human-readable'
Packit Service b7b338
			--vendor-specific':also dump binary vendor infos'
Packit Service b7b338
			-v':alias of --vendor-specific'
Packit Service b7b338
			)
Packit Service b7b338
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme id-ctrl options" _idctrl
Packit Service b7b338
			;;
Packit Service b7b338
		(id-ns)
Packit Service b7b338
			local _idns
Packit Service b7b338
			_idns=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':show infos for namespace <nsid>'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--raw-binary':dump infos in binary format'
Packit Service b7b338
			-b':alias of --raw-binary'
Packit Service b7b338
			--human-readable':show infos in readable format'
Packit Service b7b338
			-H':alias of --human-readable'
Packit Service b7b338
			--vendor-specific':also dump binary vendor infos'
Packit Service b7b338
			-v':alias of --vendor-specific'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme id-ns options" _idns
Packit Service b7b338
			;;
Packit Service b7b338
		(list-ns)
Packit Service b7b338
			local _listns
Packit Service b7b338
			_listns=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':start namespace infos listing with this nsid'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme list-ns options" _listns
Packit Service b7b338
			;;
Packit Service b7b338
		(create-ns)
Packit Service b7b338
			local _createns
Packit Service b7b338
			_createns=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--nsze=':namespace size to create'
Packit Service b7b338
			-s':alias of --nsze'
Packit Service b7b338
			--ncap=':namespace capacity'
Packit Service b7b338
			-c':alias of --ncap'
Packit Service b7b338
			--flbas=':FLBA size'
Packit Service b7b338
			-f':alias of --flbas'
Packit Service b7b338
			--dps=':data protection?'
Packit Service b7b338
			-d':alias of --dps'
Packit Service b7b338
			--nmic=':multipath and sharing'
Packit Service b7b338
			-n':alias of --nmic'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme create-ns options" _createns
Packit Service b7b338
			;;
Packit Service b7b338
		(delete-ns)
Packit Service b7b338
			local _deletens
Packit Service b7b338
			_deletens=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':namespace to delete'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme delete-ns options" _deletens
Packit Service b7b338
			;;
Packit Service b7b338
		(attach-ns)
Packit Service b7b338
			local _attachns
Packit Service b7b338
			_attachns=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':namespace to attach to the controller'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--controllers=':if a device is not provided, supply a comma-sep list of controllers'
Packit Service b7b338
			-c':alias of --controllers'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme attach-ns options" _attachns
Packit Service b7b338
			;;
Packit Service b7b338
		(detach-ns)
Packit Service b7b338
			local _detachns
Packit Service b7b338
			_detachns=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':namespace to detach from controller'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--controllers=':if a device is not provided, supply a comma-sep list of controllers'
Packit Service b7b338
			-c':alias of --controllers'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme detach-ns options" _detachns
Packit Service b7b338
			;;
Packit Service b7b338
		(list-ctrl)
Packit Service b7b338
			local _listctrl
Packit Service b7b338
			_listctrl=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':show controllers attached to this namespace'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--cntid=':start the list with this controller'
Packit Service b7b338
			-c':alias of --cntid'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme list-ctrl options" _listctrl
Packit Service b7b338
			;;
Packit Service b7b338
		(get-ns-id)
Packit Service b7b338
			local _getnsid
Packit Service b7b338
			_getnsid=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme get-ns-id options" _getnsid
Packit Service b7b338
			;;
Packit Service b7b338
		(get-log)
Packit Service b7b338
			local _getlog
Packit Service b7b338
			_getlog=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--log-id=':requested log number'
Packit Service b7b338
			-i':alias of --log-id'
Packit Service b7b338
			--log-len=':number of bytes to show for requested log'
Packit Service b7b338
			-l':alias of --log-len'
Packit Service b7b338
			--namespace-id=':get log specific to <nsid> if namespace logs are supported'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--raw-binary':dump infos in binary format'
Packit Service b7b338
			-b':alias of --raw-binary'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme get-log options" _getlog
Packit Service b7b338
			;;
Packit Service b7b338
		(fw-log)
Packit Service b7b338
			local _fwlog
Packit Service b7b338
			_fwlog=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--raw-binary':dump infos in binary format'
Packit Service b7b338
			-b':alias of --raw-binary'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme fw-log options" _fwlog
Packit Service b7b338
			;;
Packit Service b7b338
		(smart-log)
Packit Service b7b338
			local _smartlog
Packit Service b7b338
			_smartlog=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':get SMART log specific to <nsid> if namespace logs are supported'
Packit Service b7b338
			-n':alias to --namespace-id'
Packit Service b7b338
			--raw-binary':dump infos in binary format'
Packit Service b7b338
			-b':alias to --raw-binary'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme smart-log options" _smartlog
Packit Service b7b338
			;;
Packit Service b7b338
		(smart-log-add)
Packit Service b7b338
			local _add
Packit Service b7b338
			_add=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':get additional SMART log specific to <nsid> if namespace logs supported'
Packit Service b7b338
			-n':alias to --namespace-id'
Packit Service b7b338
			--raw-binary':dump infos in binary format'
Packit Service b7b338
			-b':alias to --raw-binary'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme smart-log-add options" _add
Packit Service b7b338
			;;
Packit Service b7b338
		(error-log)
Packit Service b7b338
			local _errlog
Packit Service b7b338
			_errlog=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':get log specific to <nsid> if namespace logs are supported'
Packit Service b7b338
			-n':alias to --namespace-id'
Packit Service b7b338
			--raw-binary':dump infos in binary format'
Packit Service b7b338
			-b':alias to --raw-binary'
Packit Service b7b338
			--log-entries=':request n >= 1 log entries'
Packit Service b7b338
			-e':alias to --log-entries'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme error-log options" _errlog
Packit Service b7b338
			;;
Packit Service b7b338
		(get-feature)
Packit Service b7b338
			local _getf
Packit Service b7b338
			_getf=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':get feature specific to <nsid>'
Packit Service b7b338
			-n':alias to --namespace-id'
Packit Service b7b338
			--feature-id=':hexadecimal name of feature to examine (required)'
Packit Service b7b338
			-f':alias to --feature-id'
Packit Service b7b338
			--sel=':select from 0 - current, 1 - default, 2 - saved, 3 - supported'
Packit Service b7b338
			-s':alias to --sel'
Packit Service b7b338
			--data-len=':buffer len for returned LBA Type Range or host identifier data'
Packit Service b7b338
			-l':alias for --data-len'
Packit Service b7b338
			--cdw11=':dword 11 value, used for interrupt vector configuration only'
Packit Service b7b338
			--raw-binary':dump infos in binary format'
Packit Service b7b338
			-b':alias to --raw-binary'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme get-feature options" _getf
Packit Service b7b338
			;;
Packit Service b7b338
		(set-feature)
Packit Service b7b338
			local _setf
Packit Service b7b338
			_setf=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':feature is specific to <nsid>'
Packit Service b7b338
			-n':alias to --namespace-id'
Packit Service b7b338
			--feature-id=':hexadecimal name of feature to set (required)'
Packit Service b7b338
			-f':alias to --feature-id'
Packit Service b7b338
			--data-len=':buffer length, only used for LBA Type Range or host identifier data'
Packit Service b7b338
			-l':alias for --data-len'
Packit Service b7b338
			--data=':data file for LBA Type Range or host identifier buffer (defaults to stdin)'
Packit Service b7b338
			-d':alias to --data'
Packit Service b7b338
			--value=':new value of feature (required)'
Packit Service b7b338
			-v'alias to --value'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme set-feature options" _setf
Packit Service b7b338
			;;
Packit Service b7b338
		(format)
Packit Service b7b338
			local _format
Packit Service b7b338
			_format=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':<nsid> of namespace to format (required)'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--lbaf=':LBA format to apply to namespace (required)'
Packit Service b7b338
			-l':alias of --lbaf'
Packit Service b7b338
			--ses=':secure erase? 0 - no-op (default), 1 - user-data erase, 2 - cryptographic erase'
Packit Service b7b338
			-s':alias of --ses'
Packit Service b7b338
			--pil=':location of protection information? 0 - end, 1 - start'
Packit Service b7b338
			-p':alias of --pil'
Packit Service b7b338
			--pi=':protection information? 0 - off, 1 - Type 1 on, 2 - Type 2 on, 3 - Type 3 on'
Packit Service b7b338
			-i':alias of --pi'
Packit Service b7b338
			--ms=':extended format? 0 - off (metadata in separate buffer), 1 - on (extended LBA used)'
Packit Service b7b338
			-m':alias of --ms'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme format options" _format
Packit Service b7b338
			;;
Packit Service b7b338
		(fw-activate)
Packit Service b7b338
			local _fwact
Packit Service b7b338
			_fwact=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--action=':activation action (required)? 0 - replace fw without activating, 1 - replace with activation, 2 - replace with activation at next reset'
Packit Service b7b338
			-a':alias of --action'
Packit Service b7b338
			--slot=':firmware slot to activate'
Packit Service b7b338
			-s':alias of --slot'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme fw-activate options" _fwact
Packit Service b7b338
			;;
Packit Service b7b338
		(fw-download)
Packit Service b7b338
			local _fwd
Packit Service b7b338
			_fwd=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--fw=':firmware file to download (required)'
Packit Service b7b338
			-f':alias of --fw'
Packit Service b7b338
			--xfer=':limit on chunk-size of transfer (if device has download size limit)'
Packit Service b7b338
			-x':alias of --xfer'
Packit Service b7b338
			--offset=':starting offset, in dwords (defaults to 0, only useful if download is split across multiple files)'
Packit Service b7b338
			-o':alias of --offset'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme fw-download options" _fwd
Packit Service b7b338
			;;
Packit Service b7b338
		(admin-passthru)
Packit Service b7b338
			local _admin
Packit Service b7b338
			_admin=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--opcode=':hexadecimal opcode to send (required)'
Packit Service b7b338
			-o':alias of --opcode'
Packit Service b7b338
			--flags=':command flags'
Packit Service b7b338
			-f':alias of --flags'
Packit Service b7b338
			--rsvd=':value for reserved field'
Packit Service b7b338
			-R':alias of --rsvd'
Packit Service b7b338
			--namespace-id=':value for nsid'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--data-len=':length for data buffer'
Packit Service b7b338
			-l':alias of --data-len'
Packit Service b7b338
			--metadata-len=':length for metadata buffer'
Packit Service b7b338
			-m':alias of --metadata-len'
Packit Service b7b338
			--timeout=':value for timeout'
Packit Service b7b338
			-t':alias of --timeout'
Packit Service b7b338
			--cdw2=':value for command dword 2'
Packit Service b7b338
			-2':alias for --cdw2'
Packit Service b7b338
			--cdw3=':value for command dword 3'
Packit Service b7b338
			-3':alias for --cdw3'
Packit Service b7b338
			--cdw10=':value for command dword 10'
Packit Service b7b338
			-4':alias for --cdw10'
Packit Service b7b338
			--cdw11=':value for command dword 11'
Packit Service b7b338
			-5':alias for --cdw11'
Packit Service b7b338
			--cdw12=':value for command dword 12'
Packit Service b7b338
			-6':alias for --cdw12'
Packit Service b7b338
			--cdw13=':value for command dword 13'
Packit Service b7b338
			-7':alias for --cdw13'
Packit Service b7b338
			--cdw14=':value for command dword 14'
Packit Service b7b338
			-8':alias for command dword 14'
Packit Service b7b338
			--cdw15=':value for command dword 15'
Packit Service b7b338
			-9':alias for command dword 15'
Packit Service b7b338
			--input-file=':defaults to stdin; input for write (send direction)'
Packit Service b7b338
			-i':alias for --input-file'
Packit Service b7b338
			--raw-binary':dump output in binary format'
Packit Service b7b338
			-b':alias for --raw-binary'
Packit Service b7b338
			--show-command':simply print command instead of sending it to <device>'
Packit Service b7b338
			-s':alias for --show-command'
Packit Service b7b338
			--dry-run':alias for --show-command'
Packit Service b7b338
			-d':alias for --show-command'
Packit Service b7b338
			--read':set dataflow direction to receive'
Packit Service b7b338
			-r':alias for --read'
Packit Service b7b338
			--write':set dataflow direction to send'
Packit Service b7b338
			-w':alias for --write'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme admin-passthru options" _admin
Packit Service b7b338
			;;
Packit Service b7b338
		(io-passthru)
Packit Service b7b338
			local _io
Packit Service b7b338
			_io=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--opcode=':hexadecimal opcode to send (required)'
Packit Service b7b338
			-o':alias of --opcode'
Packit Service b7b338
			--flags=':command flags'
Packit Service b7b338
			-f':alias of --flags'
Packit Service b7b338
			--rsvd=':value for reserved field'
Packit Service b7b338
			-R':alias of --rsvd'
Packit Service b7b338
			--namespace-id=':value for nsid'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--data-len=':length for data buffer'
Packit Service b7b338
			-l':alias of --data-len'
Packit Service b7b338
			--metadata-len=':length for metadata buffer'
Packit Service b7b338
			-m':alias of --metadata-len'
Packit Service b7b338
			--timeout=':value for timeout'
Packit Service b7b338
			-t':alias of --timeout'
Packit Service b7b338
			--cdw2=':value for command dword 2'
Packit Service b7b338
			-2':alias for --cdw2'
Packit Service b7b338
			--cdw3=':value for command dword 3'
Packit Service b7b338
			-3':alias for --cdw3'
Packit Service b7b338
			--cdw10=':value for command dword 10'
Packit Service b7b338
			-4':alias for --cdw10'
Packit Service b7b338
			--cdw11=':value for command dword 11'
Packit Service b7b338
			-5':alias for --cdw11'
Packit Service b7b338
			--cdw12=':value for command dword 12'
Packit Service b7b338
			-6':alias for --cdw12'
Packit Service b7b338
			--cdw13=':value for command dword 13'
Packit Service b7b338
			-7':alias for --cdw13'
Packit Service b7b338
			--cdw14=':value for command dword 14'
Packit Service b7b338
			-8':alias for command dword 14'
Packit Service b7b338
			--cdw15=':value for command dword 15'
Packit Service b7b338
			-9':alias for command dword 15'
Packit Service b7b338
			--input-file=':defaults to stdin; input for write (send direction)'
Packit Service b7b338
			-i':alias for --input-file'
Packit Service b7b338
			--raw-binary':dump output in binary format'
Packit Service b7b338
			-b':alias for --raw-binary'
Packit Service b7b338
			--show-command':simply print command instead of sending it to <device>'
Packit Service b7b338
			-s':alias for --show-command'
Packit Service b7b338
			--dry-run':alias for --show-command'
Packit Service b7b338
			-d':alias for --show-command'
Packit Service b7b338
			--read':set dataflow direction to receive'
Packit Service b7b338
			-r':alias for --read'
Packit Service b7b338
			--write':set dataflow direction to send'
Packit Service b7b338
			-w':alias for --write'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme io-passthru options" _io
Packit Service b7b338
			;;
Packit Service b7b338
		(security-send)
Packit Service b7b338
			local _ssend
Packit Service b7b338
			_ssend=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--file=':payload'
Packit Service b7b338
			-f':alias for --file'
Packit Service b7b338
			--secp=':security protocol as defined in SPC-4'
Packit Service b7b338
			-p':alias for --secp'
Packit Service b7b338
			--spsp=':send security-protocol-specific data as defined in SPC-4'
Packit Service b7b338
			-s':alias for --spsp'
Packit Service b7b338
			--tl=':transfer length as defined in SPC-4'
Packit Service b7b338
			-t':alias for --tl'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme security-send options" _ssend
Packit Service b7b338
			;;
Packit Service b7b338
		(security-recv)
Packit Service b7b338
			local _srecv
Packit Service b7b338
			_srecv=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--secp=':security protocol as defined in SPC-4'
Packit Service b7b338
			-p':alias for --secp'
Packit Service b7b338
			--spsp=':send security-protocol-specific data as defined in SPC-4'
Packit Service b7b338
			-s':alias for --spsp'
Packit Service b7b338
			--size=':size of buffer (prints to stdout on successful recv)'
Packit Service b7b338
			-x':alias for --size'
Packit Service b7b338
			--al=':allocation length as defined in SPC-4'
Packit Service b7b338
			-a':alias for --al'
Packit Service b7b338
			--raw-binary':dump output in binary format'
Packit Service b7b338
			-b':alias for --raw-binary'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme security-recv options" _srecv
Packit Service b7b338
			;;
Packit Service b7b338
		(resv-acquire)
Packit Service b7b338
			local _acq
Packit Service b7b338
			_acq=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':<nsid> of namespace to try to reserve (required)'
Packit Service b7b338
			-n':alias for --namespace-id'
Packit Service b7b338
			--prkey=':pre-empt reservation key'
Packit Service b7b338
			-p':alias for --prkey'
Packit Service b7b338
			--rtype=':hexadecimal reservation type'
Packit Service b7b338
			-t':alias for --rtype'
Packit Service b7b338
			--racqa=':reservation acquiry action'
Packit Service b7b338
			-a':alias for --racqa'
Packit Service b7b338
			--iekey=':ignore existing reservation key'
Packit Service b7b338
			-i':alias for --iekey'
Packit Service b7b338
			--crkey':current reservation key'
Packit Service b7b338
			-c':alias for --crkey'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme resv-acquire options" _acq
Packit Service b7b338
			;;
Packit Service b7b338
		(resv-release)
Packit Service b7b338
			local _rel
Packit Service b7b338
			_rel=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':nsid'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--rtype=':hexadecimal reservation type'
Packit Service b7b338
			-t':alias of --rtype'
Packit Service b7b338
			--rrela=':reservation release action'
Packit Service b7b338
			-a':alias of --rrela'
Packit Service b7b338
			--iekey':ignore existing reservation key'
Packit Service b7b338
			-i':alias of --iekey'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme resv-release options" _rel
Packit Service b7b338
			;;
Packit Service b7b338
		(resv-report)
Packit Service b7b338
			local _rep
Packit Service b7b338
			_rep=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':nsid'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--numd=':number of dwords of reservation status to xfer'
Packit Service b7b338
			-d':alias of --numd'
Packit Service b7b338
			--raw-binary':dump output in binary format'
Packit Service b7b338
			-b':alias of --raw-binary'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme resv-report options" _rep
Packit Service b7b338
			;;
Packit Service b7b338
		(resv-register)
Packit Service b7b338
			local _reg
Packit Service b7b338
			_reg=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':nsid'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			--crkey=':current reservation key'
Packit Service b7b338
			-c'alias of --crkey'
Packit Service b7b338
			--nrkey=':new reservation key'
Packit Service b7b338
			-k':alias of --nrkey'
Packit Service b7b338
			--cptpl=':change persistence through power loss setting'
Packit Service b7b338
			-p':alias for --cptpl'
Packit Service b7b338
			--rrega=':reservation registration action to perform'
Packit Service b7b338
			-a':alias for --rrega'
Packit Service b7b338
			--iekey':ignore existing reservation key'
Packit Service b7b338
			-i':alias for --iekey'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme resv-register options" _reg
Packit Service b7b338
			;;
Packit Service b7b338
		(flush)
Packit Service b7b338
			local _flush
Packit Service b7b338
			_flush=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--namespace-id=':nsid'
Packit Service b7b338
			-n':alias of --namespace-id'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme flush options" _flush
Packit Service b7b338
			;;
Packit Service b7b338
		(compare)
Packit Service b7b338
			local _comp
Packit Service b7b338
			_comp=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--start-block=':begin compare at this 64-bit LBA on device'
Packit Service b7b338
			-s':alias of --start-block'
Packit Service b7b338
			--block-count=':number of logical blocks on device to compare to local data'
Packit Service b7b338
			-c':alias of --block-count'
Packit Service b7b338
			--metadata-size=':number of bytes of metadata to compare'
Packit Service b7b338
			-y':alias of --metadata-size'
Packit Service b7b338
			--data-size=':size of local data buffer in bytes'
Packit Service b7b338
			-z':alias of --data-size'
Packit Service b7b338
			--data=':local data file to compare to blocks on device'
Packit Service b7b338
			-d':alias of --data'
Packit Service b7b338
			--prinfo=':protection information action and check field'
Packit Service b7b338
			-p':alias of --prinfo'
Packit Service b7b338
			--app-tag-mask=':application tag mask (for end to end PI)'
Packit Service b7b338
			-m':alias of --app-tag-mask'
Packit Service b7b338
			--app-tag=':application tag (for end to end PI)'
Packit Service b7b338
			-a':alias of --app-tag'
Packit Service b7b338
			--limited-retry':if included, controller should try less hard to retrieve data from media (if not included, all available data recovery means used)'
Packit Service b7b338
			-l':alias of --limited-retry'
Packit Service b7b338
			--force-unit-access':if included, the data shall be read from non-volatile media'
Packit Service b7b338
			-f':alias of --force-unit access'
Packit Service b7b338
			--show-command':show command instead of sending to device'
Packit Service b7b338
			-v':alias of --show-command'
Packit Service b7b338
			--dry-run':show command instead of sending to device'
Packit Service b7b338
			-w':alias of --show-command'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme compare options" _comp
Packit Service b7b338
			;;
Packit Service b7b338
		(read)
Packit Service b7b338
			local _read
Packit Service b7b338
			_read=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--start-block=':64-bit address of the first logical block to be read'
Packit Service b7b338
			-s':alias of --start-block'
Packit Service b7b338
			--block-count=':number of logical blocks on device to read'
Packit Service b7b338
			-c':alias of --block-count'
Packit Service b7b338
			--data-size=':size of data to be read'
Packit Service b7b338
			-z':alias of --data-size'
Packit Service b7b338
			--metadata-size=':size of metadata to be read'
Packit Service b7b338
			-y':alias of --metadata-size'
Packit Service b7b338
			--ref-tag=':reference tag (for end to end PI)'
Packit Service b7b338
			-r':alias of --ref-tag'
Packit Service b7b338
			--data=':file into which data should be read (defaults to stdout)'
Packit Service b7b338
			-d':alias of --data'
Packit Service b7b338
			--prinfo=':protection information and check field'
Packit Service b7b338
			-p':alias of --prinfo'
Packit Service b7b338
			--app-tag-mask=':application tag mask (for end to end PI)'
Packit Service b7b338
			-m':alias of --app-tag-mask'
Packit Service b7b338
			--app-tag=':application tag (for end to end PI)'
Packit Service b7b338
			-a':alias of --app-tag'
Packit Service b7b338
			--limited-retry=':if included, controller should try less hard to retrieve data from media (if not included, all available data-recovery means used)'
Packit Service b7b338
			-l':alias of --limited-retry'
Packit Service b7b338
			--latency':latency statistics will be output following read'
Packit Service b7b338
			-t':alias of --latency'
Packit Service b7b338
			--force-unit-access':data read shall be returned from nonvolatile media before command completion is indicated'
Packit Service b7b338
			-f':alias of --force-unit-access'
Packit Service b7b338
			--show-command':show command instead of sending to device'
Packit Service b7b338
			-v':alias of --show-command'
Packit Service b7b338
			--dry-run':show command instead of sending to device'
Packit Service b7b338
			-w':alias of --show-command'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme read options" _read
Packit Service b7b338
			;;
Packit Service b7b338
		(write)
Packit Service b7b338
			local _wr
Packit Service b7b338
			_wr=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			--start-block=':64-bit address of the first logical block to be written'
Packit Service b7b338
			-s':alias of --start-block'
Packit Service b7b338
			--block-count=':number of logical blocks on device to write'
Packit Service b7b338
			-c':alias of --block-count'
Packit Service b7b338
			--data-size=':size of data to be written'
Packit Service b7b338
			-z':alias of --data-size'
Packit Service b7b338
			--metadata-size=':size of metadata to be written'
Packit Service b7b338
			-y':alias of --metadata-size'
Packit Service b7b338
			--ref-tag=':reference tag (for end to end PI)'
Packit Service b7b338
			-r':alias of --ref-tag'
Packit Service b7b338
			--data=':file from which data should be written to device (defaults to stdin)'
Packit Service b7b338
			-d':alias of --data'
Packit Service b7b338
			--prinfo=':protection information and check field'
Packit Service b7b338
			-p':alias of --prinfo'
Packit Service b7b338
			--app-tag-mask=':application tag mask (for end to end PI)'
Packit Service b7b338
			-m':alias of --app-tag-mask'
Packit Service b7b338
			--app-tag=':application tag (for end to end PI)'
Packit Service b7b338
			-a':alias of --app-tag'
Packit Service b7b338
			--limited-retry=':if included, controller should try less hard to send data to media (if not included, all available data-recovery means used)'
Packit Service b7b338
			-l':alias of --limited-retry'
Packit Service b7b338
			--latency':latency statistics will be output following write'
Packit Service b7b338
			-t':alias of --latency'
Packit Service b7b338
			--force-unit-access':data shall be written to nonvolatile media before command completion is indicated'
Packit Service b7b338
			-f':alias of --force-unit-access'
Packit Service b7b338
			--show-command':show command instead of sending to device'
Packit Service b7b338
			-v':alias of --show-command'
Packit Service b7b338
			--dry-run':show command instead of sending to device'
Packit Service b7b338
			-w':alias of --show-command'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme write options" _wr
Packit Service b7b338
			;;
Packit Service b7b338
		(show-regs)
Packit Service b7b338
			local _shor
Packit Service b7b338
			_shor=(
Packit Service b7b338
			/dev/nvme':supply a device to use (required)'
Packit Service b7b338
			)
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "nvme show-regs options" _shor
Packit Service b7b338
			;;
Packit Service b7b338
		(help)
Packit Service b7b338
			local _h
Packit Service b7b338
			_h=( id-ctrl id-ns list-ns create-ns delete-ns attach-ns detach-ns
Packit Service b7b338
			     list-ctrl get-ns-id get-log fw-log smart-log error-log get-feature
Packit Service b7b338
			     set-feature format fw-activate fw-download admin-passthru io-passthru
Packit Service b7b338
			     security-send security-recv resv-acquire resv-register resv-release
Packit Service b7b338
			     resv-report flush compare read write show-regs
Packit Service b7b338
			   )
Packit Service b7b338
			_arguments '*:: :->subcmds'
Packit Service b7b338
			_describe -t commands "help: infos on a specific nvme command, or provide no option to see a synopsis of all nvme commands" _h
Packit Service b7b338
			;;
Packit Service b7b338
		(*)
Packit Service b7b338
			_files
Packit Service b7b338
			;;
Packit Service b7b338
		esac
Packit Service b7b338
		return
Packit Service b7b338
	fi
Packit Service b7b338
Packit Service b7b338
	_files
Packit Service b7b338
}