From 431b81b2a77f43cb6cbf6d3eec85821130c05228 Mon Sep 17 00:00:00 2001 From: JGill Date: Sat, 25 Sep 2021 10:41:48 +0530 Subject: [PATCH] Making aliases work, that relay on oh-my-zsh plugins --- .zshrc | 15 ++++++++++----- ezshrc.zsh | 3 +-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.zshrc b/.zshrc index 7de3535..9a613cc 100644 --- a/.zshrc +++ b/.zshrc @@ -1,7 +1,6 @@ -################ DO NOT MODIFY THIS FILE ####################### - -################################################################ - +################# DO NOT MODIFY THIS FILE ####################### +####### PLACE YOUR CONFIGS IN ~/.config/ezsh/zshrc FOLDER ####### +################################################################# # This file is created by ezsh setup. # Place all your .zshrc configurations / overrides in a single or multiple files under ~/.config/ezsh/zshrc/ folder @@ -11,7 +10,6 @@ # Load ezsh configurations source "$HOME/.config/ezsh/ezshrc.zsh" - # Any zshrc configurations under the folder ~/.config/ezsh/zshrc/ will override the default ezsh configs. # Place all of your personal configurations over there ZDOTDIR="$HOME/.config/ezsh/zshrc" @@ -21,3 +19,10 @@ if [ "$(ls -A $ZDOTDIR)" ]; then source "$file" done fi + +# Now source oh-my-zsh.sh so that any plugins added in ~/.config/ezsh/zshrc/* files also get loaded +source $ZSH/oh-my-zsh.sh + + +# Configs that can only work after "source $ZSH/oh-my-zsh.sh", such as Aliases that depend oh-my-zsh plugins +alias k="k -h" # show human readable file sizes, in kb, mb etc diff --git a/ezshrc.zsh b/ezshrc.zsh index f005fd8..c897356 100644 --- a/ezshrc.zsh +++ b/ezshrc.zsh @@ -97,7 +97,7 @@ plugins=( ) #plugins+=(zsh-nvm) -# source $ZSH/oh-my-zsh.sh +# source $ZSH/oh-my-zsh.sh # This is now run in .zshrc after importing user configs from ~/.config/ezsh/zshrc/* files # User configuration @@ -155,7 +155,6 @@ SAVEHIST=50000 #save upto 50,000 lines in history. oh-my-zsh default is 10, alias myip="wget -qO- https://wtfismyip.com/text" # quickly show external ip address alias l="ls -lah" alias x="exit" -alias k="k -h" # show human readable filesizes, in kb, mb etc # CUSTOM FUNCTIONS