From 7c653417046503d50613ab5939a116a17a9eca4b Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Sat, 22 Oct 2016 21:32:54 +1100 Subject: [PATCH] Colourify command options when doing completion --- config/zsh/interactive/completion | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config/zsh/interactive/completion b/config/zsh/interactive/completion index 7dbc8c5..f480dd9 100644 --- a/config/zsh/interactive/completion +++ b/config/zsh/interactive/completion @@ -8,7 +8,14 @@ zstyle :completion:* completer _complete _correct # Load the nice LS_COLORS into the completion menu too. Pretty! zstyle :completion:*:default list-colors ${(s.:.)LS_COLORS} -zstyle :completion:*:options list-colors '=^(-- *)=34' + +# Kiiiind of make colours work when listing command options. It's weird and +# messy. It works tho'. +zstyle :completion:*:options list-separator \| +zstyle :completion:*:options list-colors \ + "=(#b)(-##)([^ ]#) #(\\|)(*)=0=38;5;23=${color[bold]};${color[cyan]}=38;5;237=38;5;242" \ + "=(#b)(-##)([^ ]#)(*)=0=38;5;23=${color[bold]};${color[cyan]}" \ + "=(#b) #(\\|)(*)=0=38;5;237=38;5;242" # List the first page, then let me menu through everything. zmodload zsh/complist # so that listscroll is defined @@ -27,9 +34,6 @@ zstyle :completion:*:corrections format ' %F{green}-- %d (errors: %e) --%f' zstyle :completion:*:warnings format ' %F{red}-- no matches found --%f' zstyle :completion:* group-name '' -# When listing completions, highlight the first ambiguous character. -zstyle :completion:* show-ambiguity 01\;31 - # When listing directories, treat foo//bar as foo/bar, not foo/*/bar. zstyle :completion:* squeeze-slashes true