From: hayao Date: Mon, 21 Dec 2020 13:55:06 +0000 (+0900) Subject: [update] : Supported --color X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=bfeca80a948f027754b09736278ec5f2a8835484;p=alterlinux%2Fwfa.git [update] : Supported --color --- diff --git a/wfa b/wfa index 25558a3..dc0e52c 100755 --- a/wfa +++ b/wfa @@ -1053,7 +1053,7 @@ operation_sync(){ # Parse options ARGUMENT="${@}" _opt_short="QRShVdb:aysu" -_opt_long="query,remove,sync,help,version,debug,dbpath:,aururl,aur,noconfirm,config:,makepkg:,mflags:,pacman:,git:,gitflags:,gpg:,gpgflags:,makepkgconf:,nomakepkgconf,nodeps,refresh,bash-debug,msg-debug,sysupgrade" +_opt_long="query,remove,sync,help,version,debug,dbpath:,aururl,aur,noconfirm,config:,makepkg:,mflags:,pacman:,git:,gitflags:,gpg:,gpgflags:,makepkgconf:,nomakepkgconf,nodeps,refresh,bash-debug,msg-debug,sysupgrade,color:,nocolor" OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- ${ARGUMENT}) [[ ${?} != 0 ]] && exit 1 @@ -1182,6 +1182,27 @@ while :; do msgdebug=true shift 1 ;; + --color) + case "${2}" in + "never") + nocolor=true + add_args pacman "--color never" + ;; + "always") + nocolor=false + add_args pacman "--color always" + ;; + "auto") + msg_error "auto is not currently supported." + add_args pacman "--color auto" + ;; + esac + ;; + --nocolor) + nocolor=true + add_args pacman "--color never" + shift 1 + ;; -h | --help) usage shift 1