Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: show-ambiguity style

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:

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

Messages sorted by: Reverse Date, Date, Thread, Author