From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23512 invoked by alias); 17 May 2015 23:45:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35170 Received: (qmail 23844 invoked from network); 17 May 2015 23:45:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 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= X-Sasl-enc: yvkSkxuEn3YXWV/81aC8lFgleFIn6PCTLNqmnBIC8FNc 1431906332 Date: Sun, 17 May 2015 23:45:30 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: [PATCH] Proposed change to show-ambiguity context Message-ID: <20150517234530.GH2214@tarsus.local2> References: <150516223948.ZM5746@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <150516223948.ZM5746@torch.brasslantern.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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?