Color only the dangerous commands pattern

This commit is contained in:
Jeremy Gardais 2023-08-09 12:26:54 +02:00
parent 93970a9ef0
commit 69c56fa06f
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 2 additions and 2 deletions

4
zshrc
View File

@ -2508,8 +2508,8 @@ fi
### the double quotation marks ### the double quotation marks
ZSH_HIGHLIGHT_HIGHLIGHTERS=(regexp main brackets pattern) ZSH_HIGHLIGHT_HIGHLIGHTERS=(regexp main brackets pattern)
### Dangerous commands ### Dangerous commands
ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red') ZSH_HIGHLIGHT_PATTERNS+=('rm -rf ' 'fg=white,bold,bg=black')
ZSH_HIGHLIGHT_PATTERNS+=('sudo*' 'fg=white,bold,bg=red') ZSH_HIGHLIGHT_PATTERNS+=('sudo ' 'fg=white,bold,bg=red')
### CLI ### CLI
ZSH_HIGHLIGHT_REGEXP+=('\ \-[^- ]+' 'fg=202') # short args in orange (-l) ZSH_HIGHLIGHT_REGEXP+=('\ \-[^- ]+' 'fg=202') # short args in orange (-l)
ZSH_HIGHLIGHT_REGEXP+=('\ \--[^ ]+' 'fg=214') # long args in light orange (--all) ZSH_HIGHLIGHT_REGEXP+=('\ \--[^ ]+' 'fg=214') # long args in light orange (--all)