Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [^ax-y] doesn't work but [^x-ya] does
- X-seq: zsh-workers 40691
- From: Sebastian Gniazdowski <psprint3@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [^ax-y] doesn't work but [^x-ya] does
- Date: Thu, 02 Mar 2017 00:36:30 -0800
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=u1L5kEKpojoYJhPuVXowEccFq+ s=; b=PwEwVyhxvP8kjbbTdLQGh3qjf+be1sPwK8vZlj9nkiz20ebBZtNi1LIYv2 0fR8ZCCwdZyn5nQlEyhGEjVt2qSa0cUhZxqDwyGeuXwswF+j7xyLjvfCGl+6iQLF mG/4vLE2o6DISwW/BnfKCjkegLZT3RFGGIMxgRbyG36Rtak/k=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=smtpout; bh=u1 L5kEKpojoYJhPuVXowEccFq+s=; b=sFZySERjbomFLBeaJnNv+qlKx0150xNX69 76DCEaC5Q3DP8gZNQLwFbOQnak2FG9o/UdsPchbToYOsA9KULmNolfhz5zDn55g4 35uB6/NuM3mHDWet2klLWje/H+dW21cy1Thz/TQgnTy18XfJy5AeVYQp4TK038pv olDSBrcQw=
- In-reply-to: <1488440005.4187177.897775384.2538F781@webmail.messagingengine.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1488440005.4187177.897775384.2538F781@webmail.messagingengine.com>
The same script, but instead:
$'\03'-$'\010'
it does:
A-G
etc. Behaves the same.
--
Sebastian Gniazdowski
psprint3@xxxxxxxxxxxx
#!/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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author