Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[^ax-y] doesn't work but [^x-ya] does



Hello,
I couldn't create minimal test case interactively. In my big script, I
have:

disp_list=(
"${disp_list[@]//(#b)([$'\03'-$'\010'$'\022'])(${ZUI[PLUS]}([$'\011'-$'\020'])|)([^$'\03'-$'\010'${ZUI[COLOR_END]}]#)${ZUI[COLOR_END]}/${colormap[${match[1]}]}${colormap[${match[3]}]}$match[4]$RESET}"
)

Sorry, in vim it looks better. The point is about this part (this one
works):

[^$'\03'-$'\010'${ZUI[COLOR_END]}]#

So, no chars between code 3 .. 8 and no $ZUI[COLOR_END] (also single
char). The replaced line is in raw text:

"  [Regenerate] this module ON-THE-FLY, without list restart"

The point is: "ON-THE-FLY" isn't replaced because it contains "-", and
this happens if the above bit is written instead as:

[^${ZUI[COLOR_END]}$'\03'-$'\010']#

This however works on zsh-5.2-dev-0 and starts not working with
zsh-5.2-dev-1 reaching zsh-5.3.1-dev-0.

-- 
  Sebastian Gniazdowski
  psprint2@xxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author