zsh-workers
 help / color / mirror / code / Atom feed
* _multi_parts -f doesn’t seem to have any effect
@ 2010-11-13 15:07 Nikolai Weibull
  2010-11-13 15:53 ` ( Text in unknown character set UTF-8 not shown ) Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Nikolai Weibull @ 2010-11-13 15:07 UTC (permalink / raw)
  To: Zsh Workers

_multi_parts -f doesn’t seem to have any effect.  At least note the
one I care about, which is to apply colors to different file types.
Is this a known issue?


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

* Re: ( Text in unknown character set UTF-8 not shown )
  2010-11-13 15:07 _multi_parts -f doesn’t seem to have any effect Nikolai Weibull
@ 2010-11-13 15:53 ` Bart Schaefer
  2010-11-13 16:09   ` _multi_parts -f doesn't seem to have any effect Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2010-11-13 15:53 UTC (permalink / raw)
  To: Zsh Workers

On Nov 13,  4:07pm, Nikolai Weibull wrote:
}
} _multi_parts -f doesn't seem to have any effect.  At least note the
} one I care about, which is to apply colors to different file types.
} Is this a known issue?

It defintely passes -f through to compadd, so you're going to have to
be a bit more specific.  However, there are likely to be two combined
effects at work here.

(1) File type coloring is applied only to files that can be examined
with stat(2), unless you have some pattern-match colorings defined.

(2) _multi_parts treats each "component" of the string it breaks up as
an independent match, so it passes the prefix from the line to compadd
using -P rather than -W.

The result is that _multi_parts can only apply file coloring in cases
where there is no path prefix, i.e., files in the current directory.

Which, IIRC, is why _path_files exists in the first place.


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

* Re: _multi_parts -f doesn't seem to have any effect
  2010-11-13 15:53 ` ( Text in unknown character set UTF-8 not shown ) Bart Schaefer
@ 2010-11-13 16:09   ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2010-11-13 16:09 UTC (permalink / raw)
  To: Zsh Workers

On Nov 13,  7:53am, Bart Schaefer wrote:
} Subject: Re: ( Text in unknown character set UTF-8 not shown )

Sorry about that.  Really old mail client on this machine.


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

* Re: ( Text in unknown character set UTF-8 not shown )
       [not found] ` <101222231721.ZM21959@torch.brasslantern.com>
@ 2010-12-23 17:41   ` ZyX
  0 siblings, 0 replies; 4+ messages in thread
From: ZyX @ 2010-12-23 17:41 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: Text/Plain, Size: 1101 bytes --]

Reply to message «Re: ( Text in unknown character set UTF-8 not shown )», 
sent 10:17:21 23 December 2010, Thursday
by Bart Schaefer:

> I believe the reasoning is that double-quote is allowed to appear
> inside $'...' and to expand $'...' inside double-quotes creates a
> parsing conflict.  "How does this $'with " embeded' parse?"
"How does this $'with " embeded' parse?"
"Just like this `with " embedded` parse."
There are no parsing conflicts here, but
> Because it doesn't in any of the shells that introduced it before
> zsh had it.
is legitimate enough for me because it helps porting scripts from/to zsh.

> } It's not, as far as I can tell, mentioned in the documentation.
> 
> The documentation for zsh tends to omit things that are assumed
> knowledge, particularly when a concept or feature originates from
> another source -- because if you didn't already know about it from
> the original source, why did you even think to use it?
But when I worked in bash I knew nothing about $'...' (because I even did not 
know where to find documentation to tweak my inputrc).

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2010-12-23 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-13 15:07 _multi_parts -f doesn’t seem to have any effect Nikolai Weibull
2010-11-13 15:53 ` ( Text in unknown character set UTF-8 not shown ) Bart Schaefer
2010-11-13 16:09   ` _multi_parts -f doesn't seem to have any effect Bart Schaefer
     [not found] <AANLkTi=vnaRw3qxpuuEWF9t0K-TyPJKkhVUYy_8qR-=e@mail.gmail.com>
     [not found] ` <101222231721.ZM21959@torch.brasslantern.com>
2010-12-23 17:41   ` ( Text in unknown character set UTF-8 not shown ) ZyX

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