From 4638e90a7daf8863e0b345c253d0f02491500693 Mon Sep 17 00:00:00 2001 From: histalek Date: Sun, 25 Jul 2021 21:29:40 +0200 Subject: [PATCH] zsh: Make 'nocomment' alias filter comments with prefixed whitespaces --- .config/oh-my-zsh/aliases.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/oh-my-zsh/aliases.zsh b/.config/oh-my-zsh/aliases.zsh index c061d2b..0a23c87 100644 --- a/.config/oh-my-zsh/aliases.zsh +++ b/.config/oh-my-zsh/aliases.zsh @@ -19,7 +19,7 @@ alias l.='exa --all --list-dirs --long --color=always --group-directories-first ## 'grep' to 'rg' -> 'ripgrep' alias grep='rg' -alias nocomment="rg --invert-match '''^(#|$)'''" +alias nocomment="rg --invert-match '''^\s*(#|$)'''" ## 'cat' to 'bat' alias cat='bat'