From 1f4d77422386502ce5a67b101be6d6f16eff2175 Mon Sep 17 00:00:00 2001 From: danix Date: Tue, 18 Apr 2023 07:10:03 +0200 Subject: added showconf option. Fixed bug that prevented the rc file from being correctly sourced for GIT variables. --- SOURCE/main.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'SOURCE/main.sh') diff --git a/SOURCE/main.sh b/SOURCE/main.sh index 07f96e8..eaad776 100644 --- a/SOURCE/main.sh +++ b/SOURCE/main.sh @@ -1,5 +1,5 @@ # shellcheck disable=SC2006 -GOPT=$(getopt -o hvplr::a::e::d::s:: --long help,version,list,plain,userconf,sync,restore::,backup::,add::,edit::,delete::,show:: -n 'bash-notes' -- "$@") +GOPT=$(getopt -o hvplr::a::e::d::s:: --long help,version,list,plain,userconf,showconf,sync::,restore::,backup::,add::,edit::,delete::,show:: -n 'bash-notes' -- "$@") # shellcheck disable=SC2181 if [ $? != 0 ] ; then helptext >&2 ; exit 1 ; fi @@ -92,7 +92,19 @@ while true; do exit ;; --sync ) - gitsync + case "$2" in + '' ) + gitsync + ;; + '-f' ) + gitsync -f + ;; + * ) + helptext + exit + ;; + esac + shift 2 exit ;; --userconf ) @@ -102,6 +114,10 @@ while true; do # shellcheck disable=SC2317 exit ;; + --showconf ) + configtext + exit + ;; --backup ) case "$2" in '' ) -- cgit v1.2.3