bash-completion.sh
branchv_0
changeset 44 dd7094457e44
parent 43 3c8ea5dcf793
child 45 5e5815fdcd2d
equal deleted inserted replaced
43:3c8ea5dcf793 44:dd7094457e44
    26 		"string"
    26 		"string"
    27 		"integer"
    27 		"integer"
    28 		"boolean"
    28 		"boolean"
    29 	)
    29 	)
    30 
    30 
       
    31 	WRITE_HEADER=(
       
    32 		"true"
       
    33 		"false"
       
    34 	)
       
    35 
    31 	if   [[ "$w1" == "--relation"                      && "x$w0" == "x" ]];    then COMPREPLY=("''")
    36 	if   [[ "$w1" == "--relation"                      && "x$w0" == "x" ]];    then COMPREPLY=("''")
    32 	elif [[ "$w1" == "--attribute"                     && "x$w0" == "x" ]];    then COMPREPLY=("''")
    37 	elif [[ "$w1" == "--attribute"                     && "x$w0" == "x" ]];    then COMPREPLY=("''")
    33 	elif [[ "$w2" == "--attribute"                                      ]];    then COMPREPLY=($(compgen -W "${DATA_TYPE[*]}" -- "$w0"))
    38 	elif [[ "$w2" == "--attribute"                                      ]];    then COMPREPLY=($(compgen -W "${DATA_TYPE[*]}" -- "$w0"))
       
    39 	elif [[ "$w1" == "--write-header"                                  ]];    then COMPREPLY=($(compgen -W "${WRITE_HEADER[*]}" -- "$w0"))
    34 	else
    40 	else
    35 		OPTIONS=(
    41 		OPTIONS=(
    36 			"--relation"
    42 			"--relation"
       
    43 			"--write-header"
    37 			"--attribute"
    44 			"--attribute"
    38 			"--record"
    45 			"--record"
    39 			"--records"
    46 			"--records"
    40 			"--records-from-stdin"
    47 			"--records-from-stdin"
    41 		)
    48 		)