bash-completion.sh
branchv_0
changeset 4 500ce0b934e7
parent 0 0a0cb749c10f
child 5 8f434dc38444
equal deleted inserted replaced
3:18bb23fc811f 4:500ce0b934e7
    25 	BOOLEAN_VALUES=(
    25 	BOOLEAN_VALUES=(
    26 		"true"
    26 		"true"
    27 		"false"
    27 		"false"
    28 	)
    28 	)
    29 
    29 
    30 	  if [[ "$w1" == "--list-xxx"                                       ]];    then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
    30 	  if [[ "$w1" == "--list-polygon-points"                            ]];    then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
    31 	elif [[ "$w1" == "--list-zzz"                                       ]];    then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
       
    32 	else
    31 	else
    33 		OPTIONS=(
    32 		OPTIONS=(
    34 			"--list-xxx"
    33 			"--list-polygon-points"
    35 			"--list-zzz"
       
    36 		)
    34 		)
    37 		COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
    35 		COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
    38 	fi
    36 	fi
    39 }
    37 }
    40 
    38