From 807dd358c92b3cf3c93facac0cc02b00e7954ff0 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 18:41:52 -0700 Subject: [PATCH] zsh: don't remove aliases that don't already exist --- .zshrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 0bc99fc..0eba1cb 100644 --- a/.zshrc +++ b/.zshrc @@ -76,8 +76,10 @@ ${SKIP_PLUGINS:-false} || { # clear plugin options set at the start of this block unalias zinit - # just gonna sneak this in here too - alias zi > /dev/null && unalias zi zpl zini zplg which-command run-help fsh-alias + # delete aliases added by zinit and zsh that I don't care about + unaliases(){ for A in "$@";do alias "$A" > /dev/null && unalias "$A";done; } + unaliases zi zpl zini zplg which-command run-help fsh-alias + unset -f unaliases } # <<< }