diff options
| -rwxr-xr-x | gist | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -157,9 +157,9 @@ _process_json() { | |||
| 157 | _configure() { | 157 | _configure() { |
| 158 | [[ $# == 0 ]] && ${EDITOR:-vi} $CONFIG && return 0 | 158 | [[ $# == 0 ]] && ${EDITOR:-vi} $CONFIG && return 0 |
| 159 | 159 | ||
| 160 | local key=$1; local value="$2" | 160 | local key=$1; local value="$2"; valid_configs=${VALID_CONFIGS[@]} |
| 161 | [[ ! " ${VALID_CONFIGS[@]} " =~ " ${key} " ]] \ | 161 | [[ ! ${key} =~ ^(${valid_configs// /|})$ ]] \ |
| 162 | && echo "Not a valid key for configuration, use <${VALID_CONFIGS[@]}> instead." \ | 162 | && echo "Not a valid key for configuration, use <${valid_configs[@]// /|}> instead." \ |
| 163 | && return 1 | 163 | && return 1 |
| 164 | 164 | ||
| 165 | case $key in | 165 | case $key in |