From 69c56fa06ffbe05a42c7f66601a2fe864244a5b4 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Wed, 9 Aug 2023 12:26:54 +0200 Subject: [PATCH] Color only the dangerous commands pattern --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 8f7ab21..8d849f9 100644 --- a/zshrc +++ b/zshrc @@ -2508,8 +2508,8 @@ fi ### the double quotation marks ZSH_HIGHLIGHT_HIGHLIGHTERS=(regexp main brackets pattern) ### Dangerous commands -ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red') -ZSH_HIGHLIGHT_PATTERNS+=('sudo*' 'fg=white,bold,bg=red') +ZSH_HIGHLIGHT_PATTERNS+=('rm -rf ' 'fg=white,bold,bg=black') +ZSH_HIGHLIGHT_PATTERNS+=('sudo ' 'fg=white,bold,bg=red') ### CLI ZSH_HIGHLIGHT_REGEXP+=('\ \-[^- ]+' 'fg=202') # short args in orange (-l) ZSH_HIGHLIGHT_REGEXP+=('\ \--[^ ]+' 'fg=214') # long args in light orange (--all)