From add5e4ca5ef004c7d100d79c69651ed0548ea868 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 27 Apr 2019 13:39:44 -0700 Subject: [PATCH] Explicitly allow only -r and --refresh in argument handler It is already checked, but this make the code explicit. Signed-off-by: Mcat12 --- advanced/Scripts/chronometer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/chronometer.sh b/advanced/Scripts/chronometer.sh index 614d05ed..c62e4f29 100755 --- a/advanced/Scripts/chronometer.sh +++ b/advanced/Scripts/chronometer.sh @@ -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"