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

Re: Color in completions



On Jan 29,  2:13pm, Sebastian Gniazdowski wrote:
}
} In my script I complete Github's paths, like "psprint/plugin-name".
} Would like to give color to the two components of the path.

You can get color in completion listings with the complist module,
see "man zshmodules" or "info zsh 'The zsh/complist Module'".  In
particular this reference to $ZLS_COLORS:

  The leading-equals form also allows different parts of the displayed
  strings to be colored differently.  For this, the pattern has to use the
  `(#b)' globbing flag and pairs of parentheses surrounding the parts of
  the strings that are to be colored differently. ...

To color what's inserted onto the command line by completion, you
have to set the region_highlight array, which is what z-sy-h does.



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