Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Proposed change to show-ambiguity context
- X-seq: zsh-workers 35170
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Proposed change to show-ambiguity context
- Date: Sun, 17 May 2015 23:45:30 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=lOTzBWW/RziNElT3 PolyRbsC/EU=; b=jk2QsR1ULflivOIg+DG/TkAgtiebsHOp0vD6Onk6nDZEtnrt bqOY11wlZ4XxhcMoW5a2p7PoRYuoPDKQJYeHrunh6hlB06zrQ405WspporkJQ12E PKxkP2PfB+4sUdJ9c1c3VTfxeJDLrfsqS4rpfZRIyifLx1rTnEBXTTo06cI=
- 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-sasl-enc:x-sasl-enc; s=smtpout; bh=lOTzBWW/RziNElT 3PolyRbsC/EU=; b=lR7wKQMCfX22xSoa/zOKcalyu2JSeB6P2K+mqMk+vsedGqY SX9s4UDTqU2BANhPoaVUdEDKEl5I8GjsHS4Z55DGPKhj9anqEM20ki4hWN/1UBzx NrMQkzbWbGsc9OWG4hYdxTRkD3iLCcaxKlKm1kc9UI//GCZk55B6W0N1VahY=
- In-reply-to: <150516223948.ZM5746@torch.brasslantern.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: <150516223948.ZM5746@torch.brasslantern.com>
Bart Schaefer wrote on Sat, May 16, 2015 at 22:39:48 -0700:
> The following patch moves the lookup of the show-ambiguity style from the
> end of _main_complete (where the context is always tagless) into _setup
> where the tags used for list-colors are examined. This requires another
> local to hang on to the desired color until after compadd has been called
> to calculate the unambiguous prefix.
>
> As mentioned in the comments added to _setup, really what we want is for
> the most-specific of the list-colors or show-ambiguity context patterns
> to be chosen, because at the time of colorizing the list the ZLS_COLORS
> format used by show-ambiguity is always preferred over file-type colors.
>
I always wondered list-colors and LS_COLORS were either/or, rather than
overlay list-colors on top of LS_COLORS — that is: have the already-typed
part of the filename in color X, the next-letter-to-be-typed in color Y,
and the remainder of the filename colored according to LS_COLORS. (where
X and Y are specified by list-colors/show-ambiguity)
> (A possible way to achieve that would be to allow a list-colors value that
> looks like e.g. "ambiguous=1;31" and do away with show-ambiguity. However,
> I haven't worked out all the ramifications of that.)
>
> The patch at least allows one to choose to apply show-ambiguity in a more
> restricted set of scopes.
>
> Thoughts?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author