Explicitly allow only -r and --refresh in argument handler
It is already checked, but this make the code explicit. Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@ -461,7 +461,7 @@ chronoFunc() {
|
||||
fi
|
||||
|
||||
# Get refresh number
|
||||
if [[ "$*" == *"-r"* ]]; then
|
||||
if [[ "$*" == *"-r" || "$*" == *"-r "* || "$*" == *"--refresh" || "$*" == *"--refresh "* ]]; then
|
||||
num="$*"
|
||||
num="${num/*-r* /}"
|
||||
num_str="Refresh set for every $num seconds"
|
||||
|
Reference in New Issue
Block a user