From 8f851bbc4a4ed86aa2f768fe779130c4d2ade11f Mon Sep 17 00:00:00 2001 From: johannst Date: Tue, 19 Nov 2019 10:36:32 +0100 Subject: zshrc tabl completion added grouping --- zshrc | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/zshrc b/zshrc index f2312a0..dabcbd3 100644 --- a/zshrc +++ b/zshrc @@ -47,6 +47,21 @@ key[CtrlS]="\Cs" key[CtrlW]="\Cw" key[BackSpace]="\C?" +# Color definition + +typeset -A color +color[noColor]='%f' +color[darkGray]='%F{242}' +color[mediumGray]='%F{246}' +color[lightGray]='%F{252}' +color[brightRed]='%F{196}' +color[pinkRed]='%F{125}' +color[babyBlue]='%F{38}' +color[darkBlue]='%F{26}' +color[green]='%F{2}' +color[lightOrange]='%F{222}' + + # Basic settings setopt correctall @@ -92,6 +107,10 @@ SAVEHIST=1000 autoload -Uz compinit && compinit zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}" zstyle ':completion:*' menu select +# keep matches of same type in separate lists +zstyle ':completion:*' group-name '' +# description for each match list (%d expdanded to short desc) +zstyle ':completion:*:descriptions' format "$color[lightOrange] -- %d --$color[noColor]" zmodload zsh/complist bindkey -M menuselect "$key[ShiftTab]" reverse-menu-complete @@ -164,17 +183,6 @@ function git_info() { # Prompt -typeset -A color -color[noColor]='%f' -color[darkGray]='%F{242}' -color[mediumGray]='%F{246}' -color[lightGray]='%F{252}' -color[brightRed]='%F{196}' -color[pinkRed]='%F{125}' -color[babyBlue]='%F{38}' -color[darkBlue]='%F{26}' -color[green]='%F{2}' - function printBase16() { for i in $(seq 0 15); do print -P "%F{$i} Color $i %f"; -- cgit v1.2.3