From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12052 invoked from network); 8 Jul 2021 23:16:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Jul 2021 23:16:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:From:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=b02aC5SAOogOOzTYhapFMtjKHn6fAnSlTPJky1mYeU4=; b=sEaVDMq2kaDaEaFTpeZY9nXEoW ZlyVUdTsylyZoL/T3UoB56Cm/qreLJL88tNBu5qzoy6tyBaHdNpCNVyKXFHwgvwkU1eq2odfKf2ZY C7/mSfw9+G4gqEZLoi+e0H6Rkq51cT1xbp2iBtZ2ZJjreyE70v/KOr1K64P2MknP563LOX8xPZS/T 7Js8u9I7v5hO4Fd47zrhXrgimvYtBOpAXwamQHnoWdKAxb9RxDKCgiW47l2hudUuDIaafdknHzsk6 M0mgddVDinDaVVu6PVpVMKKk41x3V3TywboPU5uKVXxCGn/PuvQksc5iMq1y1+zs9tjHzhpGvcu/t OQ+QaJHw==; Received: from authenticated user by zero.zsh.org with local id 1m1dFR-0004rQ-DP; Thu, 08 Jul 2021 23:16:01 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1m1dFB-0004YC-1B; Thu, 08 Jul 2021 23:15:45 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94.2) (envelope-from ) id 1m1dFA-0008Ut-Lo for zsh-workers@zsh.org; Fri, 09 Jul 2021 01:15:44 +0200 From: Oliver Kiddle To: Zsh workers Subject: PATCH: fix uses of literal % characters in completion descriptions MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32665.1625786144.1@hydra> Date: Fri, 09 Jul 2021 01:15:44 +0200 Message-ID: <32666-1625786144.672871@hUn3.5Y_w.jNYg> X-Seq: 49157 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: With some helper functions like _description and _arguments, the descriptions pass via zformat so care is needed to double any % characters to avoid them being interpreted. I found some where where an intended literal % is getting lost and a couple of functions that use %B...%b for bold rather than leaving that to user style preferences. Oliver diff --git a/Completion/Linux/Command/_valgrind b/Completion/Linux/Command/_valgrind index 4a710e7f7..23a8cd734 100644 --- a/Completion/Linux/Command/_valgrind +++ b/Completion/Linux/Command/_valgrind @@ -20,7 +20,7 @@ common_own_malloc=( '--alignment=-[set minimum alignment of heap allocations]:number [16]' '--redzone-size=-[set minimum size of redzones added before/after heap blocks]:size (bytes) [16]' '--xtree-memory=-[profile heap memory in an xtree [none]:(none allocs full)' - '--xtree-memory-file=-[specify xtree memory report file]:file [xtmemory.kcg.%p]:_files' + '--xtree-memory-file=-[specify xtree memory report file]:file [xtmemory.kcg.%%p]:_files' ) common_read_varinfo=( @@ -67,7 +67,7 @@ args_addrcheck=( '(--show-leak-kinds)--show-reachable=-[show reachable blocks in leak check]:enable:(yes no)' '(--show-leak-kinds)--show-possibly-lost=-:enable:(yes no)' '--xtree-leak=-[output leak result in xtree format]:enable [no]:(yes no)' - '--xtree-leak-file=-[specify xtree leak report file]:file [xtleak.kcg.%p]:_files' + '--xtree-leak-file=-[specify xtree leak report file]:file [xtleak.kcg.%%p]:_files' '--undef-value-errors=-[check for undefined value errors]:enable [yes]:(yes no)' '--track-origins=-[show origins of undefined values]:enable [no]:(yes no)' $common_partial @@ -123,7 +123,7 @@ args_cachegrind=( '--LL=-[set LL cache manually]:size,assoc,line_size' '--cache-sim=-[collect cache stats]:enable [yes]:(yes no)' '--branch-sim=-[collect branch prediction stats]:enable [no]:(yes no)' - '--cachegrind-out-file=-[specify output file name]:file name [cachegrind.out.%p]:_files' + '--cachegrind-out-file=-[specify output file name]:file name [cachegrind.out.%%p]:_files' ) args_helgrind=( @@ -169,7 +169,7 @@ args_massif=( ))" '--detailed-freq=-[every Nth snapshot should be detailed]:snapshot interval [10]' '--max-snapshots=-[specofy maximum number of snapshots recorded]:maximum [100]' - '--massif-out-file=-[specify output file name]:filename [massif.out.%p]:_files' + '--massif-out-file=-[specify output file name]:filename [massif.out.%%p]:_files' ) args_exp_bbv=( diff --git a/Completion/Unix/Command/_baz b/Completion/Unix/Command/_baz index 4dfcdf882..0acdc4639 100644 --- a/Completion/Unix/Command/_baz +++ b/Completion/Unix/Command/_baz @@ -64,7 +64,7 @@ _baz_config () { if [[ -d "$root/configs" ]]; then configdir=("$root/configs") - _description files expl '%Bconfig file%b' + _description files expl 'config file' _files -W configdir "$expl[@]" && ret=0 else _message -e messages "No configs/ directory in tree whose root is $root" diff --git a/Completion/Unix/Command/_opustools b/Completion/Unix/Command/_opustools index c860a170f..1fd97798a 100644 --- a/Completion/Unix/Command/_opustools +++ b/Completion/Unix/Command/_opustools @@ -14,7 +14,7 @@ case $service in '--cvbr[use constrained variable bitrate encoding]' \ '--downmix-mono[downmix to mono]' \ '--downmix-stereo[downmix to stereo (if >2 channels)]' \ - '--expect-loss[set expected packet loss]:expected packet loss (%) (0-100) [0]' \ + '--expect-loss[set expected packet loss]:expected packet loss (%%) (0-100) [0]' \ '--framesize[set maximum frame size]:maximum frame size (milliseconds) [20]:(2.5 5 10 20 40 60)' \ '--hard-cbr[use hard constant bitrate encoding]' \ '--max-delay[set maximum container delay]:maximum container delay (milliseconds) (0-1000) [1000]' \ @@ -57,7 +57,7 @@ case $service in '--no-dither[do not dither 16-bit output]' \ '--float[output 32-bit floating-point samples]' \ '--force-wav[force RIFF wav header on output]' \ - '--packet-loss[simulate random packet loss]:packet loss probability (%) (0-100)' \ + '--packet-loss[simulate random packet loss]:packet loss probability (%%) (0-100)' \ '--save-range[save check values for every frame to a file]:output for check values:_files' ;; opusinfo) diff --git a/Completion/Unix/Command/_tla b/Completion/Unix/Command/_tla index 33dfc005f..ec7e76d44 100644 --- a/Completion/Unix/Command/_tla +++ b/Completion/Unix/Command/_tla @@ -73,7 +73,7 @@ _tla_config () { if [[ -d "$root/configs" ]]; then configdir=("$root/configs") - _description files expl '%Bconfig file%b' + _description files expl 'config file' _files -W configdir "$expl[@]" && ret=0 else _message -e messages "No configs/ directory in tree whose root is $root"