From: Sebastian Gniazdowski <psprint3@fastmail.com>
To: zsh-workers@zsh.org
Subject: Re: [^ax-y] doesn't work but [^x-ya] does
Date: Thu, 02 Mar 2017 00:36:30 -0800 [thread overview]
Message-ID: <1488443790.5639.897815120.5731FF56@webmail.messagingengine.com> (raw)
In-Reply-To: <1488440005.4187177.897775384.2538F781@webmail.messagingengine.com>
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
The same script, but instead:
$'\03'-$'\010'
it does:
A-G
etc. Behaves the same.
--
Sebastian Gniazdowski
psprint3@fastmail.com
[-- Attachment #2: toktest.zsh.txt --]
[-- Type: text/plain, Size: 789 bytes --]
#!/usr/local/bin/zsh-5.3.1
typeset -A ZUI
ZUI[PLUS]="X"
ZUI[COLOR_END]="Z"
button1='this module Gon-the-flyZ, DwithoutZ list restart' # not working
button2='this module GontheflyZ, DwithoutZ list restart' # working
local -A colormap
colormap=( "" "" )
translate_color_marks() {
# Working
#disp_list=( "${disp_list[@]//(#b)([A-G])(${ZUI[PLUS]}([H-I])|)([^H-I${ZUI[COLOR_END]}]#)${ZUI[COLOR_END]}/${colormap[${match[1]}]}${colormap[${match[3]}]}$match[4]$RESET}" )
# Not working
disp_list=( "${disp_list[@]//(#b)([A-G])(${ZUI[PLUS]}([H-I])|)([^${ZUI[COLOR_END]}H-I]#)${ZUI[COLOR_END]}/${colormap[${match[1]}]}${colormap[${match[3]}]}$match[4]$RESET}" )
}
disp_list=( "$button1" "$button2" )
translate_color_marks
print -rl -- "${disp_list[@]}" "---" >> ~/result.txt
next prev parent reply other threads:[~2017-03-02 8:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170302073436epcas2p1ee2d6d723bc7b0865e11243777a08417@epcas2p1.samsung.com>
2017-03-02 7:33 ` Sebastian Gniazdowski
2017-03-02 8:36 ` Sebastian Gniazdowski [this message]
2017-03-02 10:47 ` Peter Stephenson
2017-03-02 11:22 ` Sebastian Gniazdowski
2017-03-02 11:53 ` Peter Stephenson
2017-03-04 23:21 ` Bart Schaefer
2017-03-06 11:28 ` Peter Stephenson
2017-03-07 10:51 ` Peter Stephenson
2017-03-08 19:12 ` Martijn Dekker
2017-03-09 5:18 ` Bart Schaefer
2017-03-09 10:29 ` Peter Stephenson
2017-02-24 20:38 Sebastian Gniazdowski
2017-02-25 7:32 ` Bart Schaefer
2017-02-25 8:21 ` Sebastian Gniazdowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1488443790.5639.897815120.5731FF56@webmail.messagingengine.com \
--to=psprint3@fastmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).