zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: show-ambiguity style
Date: Sat, 11 Apr 2015 13:02:49 -0700	[thread overview]
Message-ID: <150411130249.ZM27498@torch.brasslantern.com> (raw)
In-Reply-To: <E1YgyLH-00089n-0P@smtp.tt-solutions.com>

On Apr 11,  6:33pm, Vadim Zeitlin wrote:
} 
} YDE> http://www.thregr.org/~wavexx/rnd/20141010-zsh_show_ambiguity/
} 
}  Thanks for the post, this definitely was unknown to me. One question
} though: is it possible to change the highlighting to use something other
} than underlining?

Zsh manual:

 show-ambiguity
     If the zsh/complist module is loaded, this style can be used to
     highlight the first ambiguous character in completion lists. The
     value is either a color indication such as those supported by the
     list-colors style or, with a value of true, a default of
     underlining is selected. The highlighting is only applied if the
     completion display strings correspond to the actual matches.

So for example:

  autoload colors
  colors
  zstyle ':completion:*' show-ambiguity $color[bg-red]

Completion gets screwed up if show-ambiguity is not an ANSI term color
attribute or one of the "true" strings (which by the way means you can't
use boldface because "1" means "true" and is therefore replaced with "4"
for underlining, but you can use e.g. "1;7" for "bold reverse video").

Anyway, the point is there could be more internal sanity checking that
the string that is output is going to make sense, but there currently is
not, so use caution.


  reply	other threads:[~2015-04-11 20:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 21:36 Yuri D'Elia
2015-04-11  2:21 ` lilydjwg
2015-04-11 16:33 ` Vadim Zeitlin
2015-04-11 20:02   ` Bart Schaefer [this message]
2015-04-12 12:40     ` Yuri D'Elia
2015-04-12 18:58       ` Bart Schaefer
2015-04-12 21:03         ` Yuri D'Elia
2015-04-13 11:00           ` Jesper Nygårds
2015-04-13 15:25             ` Bart Schaefer
2015-04-13 19:20               ` Jesper Nygårds
2015-04-12 12:40     ` Yuri D'Elia
2015-04-13 20:57     ` Daniel Shahaf
2015-04-13 20:21 ` zzapper
2015-04-15 19:56   ` Yuri D'Elia
2015-04-20 21:51     ` zzapper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150411130249.ZM27498@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).