# HG changeset patch # User František Kučera # Date 1620760222 -7200 # Node ID 88e566898f8f908ad665086f46fe311fbe8ea750 # Parent 98be80d2e65b2c6d661da6d4ccd84113f19aa0a6 new CLI interface: rename --pattern to --value because --relation and --attribute are patterns too diff -r 98be80d2e65b -r 88e566898f8f bash-completion.sh --- a/bash-completion.sh Tue May 11 20:42:22 2021 +0200 +++ b/bash-completion.sh Tue May 11 21:10:22 2021 +0200 @@ -35,7 +35,7 @@ if [[ "$w1" == "--relation" && "x$w0" == "x" ]]; then COMPREPLY=("'.*'") elif [[ "$w1" == "--attribute" && "x$w0" == "x" ]]; then COMPREPLY=("'.*'") - elif [[ "$w1" == "--pattern" && "x$w0" == "x" ]]; then COMPREPLY=("''") + elif [[ "$w1" == "--value" && "x$w0" == "x" ]]; then COMPREPLY=("''") elif [[ "$w1" == "--case-sensitive" ]]; then COMPREPLY=($(compgen -W "${ENTITY_VALUES[*]}" -- "$w0")) elif [[ "$w2" == "--case-sensitive" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0")) elif [[ "$w1" == "--invert-match" ]]; then COMPREPLY=($(compgen -W "${ENTITY_VALUES[*]}" -- "$w0")) @@ -44,7 +44,7 @@ OPTIONS=( "--relation" "--attribute" - "--pattern" + "--value" "--case-sensitive" "--invert-match" ) diff -r 98be80d2e65b -r 88e566898f8f src/CLIParser.h --- a/src/CLIParser.h Tue May 11 20:42:22 2021 +0200 +++ b/src/CLIParser.h Tue May 11 21:10:22 2021 +0200 @@ -67,7 +67,7 @@ static const relpipe::common::type::StringX OPTION_RELATION; static const relpipe::common::type::StringX OPTION_ATTRIBUTE; - static const relpipe::common::type::StringX OPTION_PATTERN; + static const relpipe::common::type::StringX OPTION_VALUE; static const relpipe::common::type::StringX OPTION_CASE_SENSITIVE; static const relpipe::common::type::StringX OPTION_INVERT_MATCH; @@ -83,7 +83,7 @@ currentRelation.relation = readNext(arguments, i); } else if (option == OPTION_ATTRIBUTE) { currentRelation.attribute = readNext(arguments, i); - } else if (option == OPTION_PATTERN) { + } else if (option == OPTION_VALUE) { currentRelation.value = readNext(arguments, i); } else if (option == OPTION_CASE_SENSITIVE) { RelationConfiguration::ENTITY entity = parseEntity(readNext(arguments, i)); @@ -104,7 +104,7 @@ const relpipe::common::type::StringX CLIParser::OPTION_RELATION = L"--relation"; const relpipe::common::type::StringX CLIParser::OPTION_ATTRIBUTE = L"--attribute"; -const relpipe::common::type::StringX CLIParser::OPTION_PATTERN = L"--pattern"; +const relpipe::common::type::StringX CLIParser::OPTION_VALUE = L"--value"; const relpipe::common::type::StringX CLIParser::OPTION_CASE_SENSITIVE = L"--case-sensitive"; const relpipe::common::type::StringX CLIParser::OPTION_INVERT_MATCH = L"--invert-match";