From b0a4ceddcd7e3b56d8982eb9afd0995fafab8470 Mon Sep 17 00:00:00 2001 From: NRK Date: Tue, 13 Apr 2021 00:15:53 +0600 Subject: [PATCH] parse -c and -s for list command --- sxbm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sxbm b/sxbm index d1fe8f7..438056d 100755 --- a/sxbm +++ b/sxbm @@ -51,6 +51,23 @@ COMMANDS: -v|--version print the version and exit\n\n" } +bm_list(){ + while [ -n "$1" ]; do + case "$1" in + "-c"|"--disable-colors") + COL_LINK=""; COL_TITLE=""; COL_LINE_NUM="" + shift + ;; + "-s"|"--strict") + local TAG_STRICT="1" + shift + ;; + *) + break + ;; + esac + done +} ############ ### main ### @@ -66,6 +83,8 @@ case "$1" in "add") ;; "ls"|"list") + shift + bm_list "$@" ;; "open") ;;