From 53caecde2f3adf1a5049c49bc8e5219217187db6 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Thu, 15 Apr 2021 21:05:35 +0900 Subject: [PATCH] include/opt: Make --verbose and --shush default arguments The -v/--verbose and -w/--shush options are frequently implemented in scripts that use toolbox. To reduce code duplication and to make all scripts follow the same argument naming conventions, this commit makes -v/--verbose and -w/--shush standard arguments of the opt module. --- include/opt.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/opt.sh b/include/opt.sh index 3c3c9a3..7af5be3 100644 --- a/include/opt.sh +++ b/include/opt.sh @@ -19,6 +19,13 @@ __init() { "Print this text" \ opt_print_help + opt_add_arg "v" "verbose" "no" 0 \ + "Be more verbose" \ + log_increase_verbosity + opt_add_arg "w" "shush" "no" 0 \ + "Be less verbose" \ + log_decrease_verbosity + return 0 } -- 2.47.3