bash-completion.sh
branchv_0
changeset 30 02972f051744
parent 29 dc3c102e1264
equal deleted inserted replaced
29:dc3c102e1264 30:02972f051744
    31 	local SHADER_TYPE=(
    31 	local SHADER_TYPE=(
    32 		"vertex"
    32 		"vertex"
    33 		"fragment"
    33 		"fragment"
    34 	)
    34 	)
    35 
    35 
    36 	if   [[ "$w1" == "--texture" ]]; then
    36 	if [[ "$w1" == "--document" ]]; then
    37 		COMPREPLY=($(compgen -f -- "$w0"; compgen -d -S / -- "$w0"))
    37 		COMPREPLY=($(compgen -f -- "$w0"; compgen -d -S / -- "$w0"))
    38 	elif [[ "$w1" == "--shader" ]]; then
    38 	elif [[ "$w1" == "--shader" ]]; then
    39 		COMPREPLY=($(compgen -W "${SHADER_TYPE[*]}" -- "$w0"))
    39 		COMPREPLY=($(compgen -W "${SHADER_TYPE[*]}" -- "$w0"))
    40 	elif [[ "$w2" == "--shader" ]]; then
    40 	elif [[ "$w2" == "--shader" ]]; then
    41 		COMPREPLY=($(compgen -f -- "$w0"; compgen -d -S / -- "$w0"))
    41 		COMPREPLY=($(compgen -f -- "$w0"; compgen -d -S / -- "$w0"))
    42 	elif [[ "$w1" == "--background-color" ]]; then
    42 	elif [[ "$w1" == "--background-color" ]]; then
    43 		COMPREPLY=($(compgen -W "${COLOR[*]}" -- "$w0"))
    43 		COMPREPLY=($(compgen -W "${COLOR[*]}" -- "$w0"))
    44 	else
    44 	else
    45 		local OPTIONS=(
    45 		local OPTIONS=(
    46 			"--texture"
    46 			"--document"
    47 			"--shader"
    47 			"--shader"
    48 			"--background-color"
    48 			"--background-color"
    49 			"--root-window"
    49 			"--root-window"
    50 		)
    50 		)
    51 		COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
    51 		COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))