1
# bash completion for smartctl(8)
7
COMPREPLY=( $( compgen -W 'errorsonly silent noserial' -- "$cur" ) )
11
local i opts='ata scsi sat marvell hpt cciss'
12
for (( i=0; i <= 31; i++ )) ; do
15
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
19
COMPREPLY=( $( compgen -W 'normal conservative permissive \
20
verypermissive' -- "$cur" ) )
24
COMPREPLY=( $( compgen -W 'warn exit ignore' -- "$cur" ) )
28
COMPREPLY=( $( compgen -W 'ioctl ataioctl scsiioctl' -- "$cur" ) )
32
COMPREPLY=( $( compgen -W 'never sleep standby idle' -- "$cur" ) )
36
COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
40
COMPREPLY=( $( compgen -W 'error selftest selective directory' -- "$cur" ) )
42
_smartctl_vendorattribute()
44
COMPREPLY=( $( compgen -W 'help 9,minutes 9,seconds 9,halfminutes \
45
9,temp 192,emergencyretractcyclect 193,loadunload \
46
194,10xCelsius 194,unknown 198,offlinescanuncsectorct \
47
200,writeerrorcount 201,detectedtacount 220,temp' -- "$cur" ) )
49
_smartctl_firmwarebug()
51
COMPREPLY=( $( compgen -W 'none samsung samsung2 samsung3 swapid' \
56
COMPREPLY=( $( compgen -W 'use ignore show showall' -- "$cur" ) )
60
COMPREPLY=( $( compgen -W 'offline short long conveyance select \
61
afterselect,on afterselect,off pending scttempint' -- "$cur" ) )
67
local cur prev split=false
70
_get_comp_words_by_ref cur prev
72
_split_longopt && split=true
98
-s|--smart|-o|--offlineauto|-S|--saveauto)
106
-v|--vendorattribute)
107
_smartctl_vendorattribute
111
_smartctl_firmwarebug
126
if [[ "$cur" == -* ]]; then
127
COMPREPLY=( $( compgen -W '--help --version --info --all --quietmode \
128
--device --tolerance --badsum --report --nocheck --smart \
129
--offlineauto --saveauto --health --capabilities --attributes \
130
--log --vendorattribute --firmwarebug --presets --test --captive \
131
--abort' -- "$cur" ) )
137
complete -F _smartctl smartctl
143
# sh-indent-comment: t
144
# indent-tabs-mode: nil
146
# ex: ts=4 sw=4 et filetype=sh