From 1eff4a9b31c33dff544c1f57b3686a3fd9fdf46c Mon Sep 17 00:00:00 2001 From: Konano Date: Sun, 23 Jul 2023 17:41:02 +0800 Subject: [PATCH] minor --- files/.zshrc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/files/.zshrc b/files/.zshrc index d8732f3..5b94963 100644 --- a/files/.zshrc +++ b/files/.zshrc @@ -72,9 +72,15 @@ zstyle ':omz:update' frequency 13 # Add wisely, as too many plugins slow down shell startup. plugins=(git) plugins+=(git-open autojump zsh-autosuggestions zsh-syntax-highlighting sudo) -plugins+=(history encode64 docker-compose tmux) +plugins+=(history encode64 tmux) plugins+=(dirhistory jsontools) -plugins+=(fzf) + +dependent_plugins() { + if command -v "$@" >/dev/null 2>&1; then plugins+=("$@"); fi +} + +dependent_plugins docker-compose +dependent_plugins fzf source $ZSH/oh-my-zsh.sh @@ -121,6 +127,7 @@ alias -s bz2='tar -xjvf' alias cp='cp -i' alias cl='clear' +alias ag='alias | grep' if [ -f "/etc/network/if-pre-up.d/iptables-load" ]; then alias ipl='sudo iptables -L -n'