mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
Improve documentation for configuring highlight style
Supersedes PR #430 and gives additional info. https://stackoverflow.com/questions/47310537/how-to-change-zsh-autosuggestions-color
This commit is contained in:
parent
e9d8231ba7
commit
b714f6667c
1 changed files with 9 additions and 1 deletions
10
README.md
10
README.md
|
@ -34,7 +34,15 @@ You may want to override the default global config variables. Default values of
|
|||
|
||||
### Suggestion Highlight Style
|
||||
|
||||
Set `ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE` to configure the style that the suggestion is shown with. The default is `fg=8`.
|
||||
Set `ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE` to configure the style that the suggestion is shown with. The default is `fg=8`, which will set the foreground color to color 8 from the 256-color palette. If your terminal only supports 8 colors, you will need to use a number between 0 and 7.
|
||||
|
||||
Background color can also be set, and the suggestion can be styled bold, underlined, or standout. For example, this would show suggestions with bold, underlined, pink text on a cyan background:
|
||||
|
||||
```sh
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ff00ff,bg=cyan,bold,underline"
|
||||
```
|
||||
|
||||
For more info, read the Character Highlighting section of the zsh manual: `man zshzle` or [online](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting).
|
||||
|
||||
|
||||
### Suggestion Strategy
|
||||
|
|
Loading…
Reference in a new issue