summaryrefslogtreecommitdiff
path: root/tw/home/files
diff options
context:
space:
mode:
authorTimo Wilken2023-06-29 23:04:04 +0200
committerTimo Wilken2023-06-29 23:04:04 +0200
commit52888f5ed8322562ff4ce1d4c4da14c98b2425cd (patch)
treeec467a2da99f7a937437e6aa612a192245a3153d /tw/home/files
parentbdac1de4ba3d47687a2256125a9b1164555134c4 (diff)
Fix zsh host completion colouring
Diffstat (limited to 'tw/home/files')
-rw-r--r--tw/home/files/zshrc9
1 files changed, 5 insertions, 4 deletions
diff --git a/tw/home/files/zshrc b/tw/home/files/zshrc
index 72fc7540..1e8afcaa 100644
--- a/tw/home/files/zshrc
+++ b/tw/home/files/zshrc
@@ -43,12 +43,13 @@ setopt appendhistory sharehistory incappendhistory extendedhistory histverify hi
zstyle ':completion:*' rehash true
# enable completion list colours
-# http://linuxshellaccount.blogspot.com/2008/12/color-completion-using-zsh-modules-on.html
-zstyle ':completion:*:*:*:*:hosts' list-colors "=*=${fg[blue]}"
-zstyle ':completion:*:*:*:*:users' list-colors "=*=${fg[green]}=${fg[red]}"
+# https://linuxshellaccount.blogspot.com/2008/12/color-completion-using-zsh-modules-on.html
+# This needs $color[C], not $fg[C]; i.e. only the colour number, not the full escape sequence.
+zstyle ':completion:*:*:*:*:hosts' list-colors "=*=${color[blue]}"
+zstyle ':completion:*:*:*:*:users' list-colors "=*=${color[green]}=${color[red]}"
# formatting and messages
-# http://www.masterzen.fr/2009/04/19/in-love-with-zsh-part-one/
+# https://www.masterzen.fr/2009/04/19/in-love-with-zsh-part-one/
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format "${fg[green]}%B--- %d%b"
zstyle ':completion:*:messages' format '%d'