Rename options "pihole --whiteregex" to "pihole --white-regex" for the sake of readability. The same applied for "whitewild" -> "white-wild"

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2019-08-05 21:10:52 +02:00
parent af754e3fc4
commit 6e2e825a5f
No known key found for this signature in database
GPG key ID: FB60471F0575164A
2 changed files with 6 additions and 6 deletions

View file

@ -39,10 +39,10 @@ helpFunc() {
param="-regex" param="-regex"
type="regex blacklist filter" type="regex blacklist filter"
elif [[ "${listType}" == "regex_whitelist" && "${wildcard}" == true ]]; then elif [[ "${listType}" == "regex_whitelist" && "${wildcard}" == true ]]; then
param="-whitewild" param="-white-wild"
type="wildcard whitelist" type="wildcard whitelist"
elif [[ "${listType}" == "regex_whitelist" ]]; then elif [[ "${listType}" == "regex_whitelist" ]]; then
param="-whiteregex" param="-white-regex"
type="regex whitelist filter" type="regex whitelist filter"
else else
param="b" param="b"
@ -230,8 +230,8 @@ for var in "$@"; do
"-b" | "blacklist" ) listType="blacklist"; listAlt="whitelist";; "-b" | "blacklist" ) listType="blacklist"; listAlt="whitelist";;
"--wild" | "wildcard" ) listType="regex_blacklist"; wildcard=true;; "--wild" | "wildcard" ) listType="regex_blacklist"; wildcard=true;;
"--regex" | "regex" ) listType="regex_blacklist";; "--regex" | "regex" ) listType="regex_blacklist";;
"--whiteregex" | "whiteregex" ) listType="regex_whitelist";; "--white-regex" | "white-regex" ) listType="regex_whitelist";;
"--whitewild" | "whitewild" ) listType="regex_whitelist"; wildcard=true;; "--white-wild" | "white-wild" ) listType="regex_whitelist"; wildcard=true;;
"-nr"| "--noreload" ) reload=false;; "-nr"| "--noreload" ) reload=false;;
"-d" | "--delmode" ) addmode=false;; "-d" | "--delmode" ) addmode=false;;
"-q" | "--quiet" ) verbose=false;; "-q" | "--quiet" ) verbose=false;;

4
pihole
View file

@ -440,8 +440,8 @@ case "${1}" in
"-b" | "blacklist" ) listFunc "$@";; "-b" | "blacklist" ) listFunc "$@";;
"--wild" | "wildcard" ) listFunc "$@";; "--wild" | "wildcard" ) listFunc "$@";;
"--regex" | "regex" ) listFunc "$@";; "--regex" | "regex" ) listFunc "$@";;
"--whiteregex" | "whiteregex" ) listFunc "$@";; "--white-regex" | "white-regex" ) listFunc "$@";;
"--whitewild" | "whitewild" ) listFunc "$@";; "--white-wild" | "white-wild" ) listFunc "$@";;
"-d" | "debug" ) debugFunc "$@";; "-d" | "debug" ) debugFunc "$@";;
"-f" | "flush" ) flushFunc "$@";; "-f" | "flush" ) flushFunc "$@";;
"-up" | "updatePihole" ) updatePiholeFunc "$@";; "-up" | "updatePihole" ) updatePiholeFunc "$@";;