From accf85d19d4664aa1cfcb19ffe4d49fec4817e6a Mon Sep 17 00:00:00 2001 From: typebrook Date: Tue, 21 Jan 2020 19:01:08 +0800 Subject: update --- scripts/gist | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scripts/gist') diff --git a/scripts/gist b/scripts/gist index 8805e19..8a22b22 100755 --- a/scripts/gist +++ b/scripts/gist @@ -277,11 +277,14 @@ _help_message() { _configure() { case "$1 $2" in - auto_sync*) echo -n $1= ;;& - *true) echo $2; shift; shift ;; - *false) echo $2; shift; shift ;; - folder) shift + auto_sync[[:space:]]*) echo -n $1 ;;& + *true) echo =$2;; + *false) echo =$2;; + folder) echo -n $1=$2 ;; esac + echo target $target + [[ $target =~ = ]] && sed -i -E "/^$1/ d" $config + echo $target >> $config } case "$1" in -- cgit v1.2.3-70-g09d2