From b7e624f5b9e72b255309670a24abc596354a7377 Mon Sep 17 00:00:00 2001 From: sev Date: Fri, 19 Jul 2024 14:16:09 -0500 Subject: [PATCH] zshrc: add grep and zutils aliases --- etc/zsh/.zshrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index 229ade9..da69412 100644 --- a/etc/zsh/.zshrc +++ b/etc/zsh/.zshrc @@ -216,6 +216,13 @@ alias p=\$PAGER alias e=\$EDITOR alias se=sudoedit alias syncwatch='sync & watch -d grep -Fe Dirty: -e Writeback: /proc/meminfo' +if [[ -v commands[grep] ]] { + [[ -v commands[fgrep] ]] || alias fgrep='grep -F' + [[ -v commands[egrep] ]] || alias fgrep='grep -E' +} +for x (cat cmp diff grep test update) { + [[ -v commands[zutils-z$x] ]] || alias z$x=zutils-z$x +} # be paranoid alias cp='cp -ip' alias mv='mv -i' -- 2.48.1