bash-completion.sh
branchv_0
changeset 26 88e566898f8f
parent 25 98be80d2e65b
equal deleted inserted replaced
25:98be80d2e65b 26:88e566898f8f
    33 		"value"
    33 		"value"
    34 	)
    34 	)
    35 
    35 
    36 	if   [[ "$w1" == "--relation"                      && "x$w0" == "x" ]];    then COMPREPLY=("'.*'")
    36 	if   [[ "$w1" == "--relation"                      && "x$w0" == "x" ]];    then COMPREPLY=("'.*'")
    37 	elif [[ "$w1" == "--attribute"                     && "x$w0" == "x" ]];    then COMPREPLY=("'.*'")
    37 	elif [[ "$w1" == "--attribute"                     && "x$w0" == "x" ]];    then COMPREPLY=("'.*'")
    38 	elif [[ "$w1" == "--pattern"                       && "x$w0" == "x" ]];    then COMPREPLY=("''")
    38 	elif [[ "$w1" == "--value"                         && "x$w0" == "x" ]];    then COMPREPLY=("''")
    39 	elif [[ "$w1" == "--case-sensitive"                                 ]];    then COMPREPLY=($(compgen -W "${ENTITY_VALUES[*]}"  -- "$w0"))
    39 	elif [[ "$w1" == "--case-sensitive"                                 ]];    then COMPREPLY=($(compgen -W "${ENTITY_VALUES[*]}"  -- "$w0"))
    40 	elif [[ "$w2" == "--case-sensitive"                                 ]];    then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
    40 	elif [[ "$w2" == "--case-sensitive"                                 ]];    then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
    41 	elif [[ "$w1" == "--invert-match"                                   ]];    then COMPREPLY=($(compgen -W "${ENTITY_VALUES[*]}"  -- "$w0"))
    41 	elif [[ "$w1" == "--invert-match"                                   ]];    then COMPREPLY=($(compgen -W "${ENTITY_VALUES[*]}"  -- "$w0"))
    42 	elif [[ "$w2" == "--invert-match"                                   ]];    then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
    42 	elif [[ "$w2" == "--invert-match"                                   ]];    then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
    43 	else
    43 	else
    44 		OPTIONS=(
    44 		OPTIONS=(
    45 			"--relation"
    45 			"--relation"
    46 			"--attribute"
    46 			"--attribute"
    47 			"--pattern"
    47 			"--value"
    48 			"--case-sensitive"
    48 			"--case-sensitive"
    49 			"--invert-match"
    49 			"--invert-match"
    50 		)
    50 		)
    51 		COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
    51 		COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
    52 	fi
    52 	fi