zsh-workers
 help / color / mirror / code / Atom feed
* Bug in colored listings with backreference patterns?
@ 2000-06-11  6:48 Bart Schaefer
  2000-06-11  7:42 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2000-06-11  6:48 UTC (permalink / raw)
  To: zsh-workers

Consider:

zagzig[137] [[ cshnullglob = (#b)((?|)sh)#(*glob*)#* ]] && \
 print -l $match[1] $match[2] $match[3]
csh
c
nullglob

Yet if I use that pattern in a list-colors style for zsh-options, I get `c'
in the third color, `sh' in the second color (so far, as expected) but only
`n' in the fourth color -- `ullglob' is in the first (default) color.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug in colored listings with backreference patterns?
  2000-06-11  6:48 Bug in colored listings with backreference patterns? Bart Schaefer
@ 2000-06-11  7:42 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-06-11  7:42 UTC (permalink / raw)
  To: zsh-workers

Possibly related is a repeatable core dump I'm getting.

------------------------------------------------------------------------
setopt extendedglob	# Doc for ZLS_COLORS should mention this
zstyle ':completion:*:zsh-options' list-colors \
	'no=22:=(#b)(sh|csh|ksh)#(*glob*)#*=39=04;32=31'
# The above crashes the shell, but if this 04; ^^^ is removed, it works.
------------------------------------------------------------------------

I have zsh-mem-debug enabled, and it appears to be dereferencing through
what used to be a pointer inside a struct that has since been freed (it's
dereferncing 0xffffffff), possibly in getcoldef() -- the stack is mostly
garbage, even running inside GDB.

What you should see if the pattern above works, is that all options that
start with sh|csh|ksh are underlined and have the shell name in green; if
the substring "glob" appears, then the rest is in red (still underlined);
and all other options that contain "glob" are in red (but not underlined).

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-06-11  7:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-11  6:48 Bug in colored listings with backreference patterns? Bart Schaefer
2000-06-11  7:42 ` Bart Schaefer

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).