aboutsummaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-02-06 17:17:53 +0800
committerGuangxiong Lin <[email protected]>2022-02-06 17:17:53 +0800
commitaaa9a733586e459341ea5b3123c2b241e6656c03 (patch)
tree9869231c94ae47063d36b32a2da596a374027161 /.zshrc
parentc1c4586895bc8fc1ebc1e3fab6587902ef81cc6d (diff)
downloaddotfiles-aaa9a733586e459341ea5b3123c2b241e6656c03.tar.gz
dotfiles-aaa9a733586e459341ea5b3123c2b241e6656c03.tar.bz2
dotfiles-aaa9a733586e459341ea5b3123c2b241e6656c03.zip
Restructure zshrc config
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc46
1 files changed, 7 insertions, 39 deletions
diff --git a/.zshrc b/.zshrc
index 9765dd0..0bb8fd3 100644
--- a/.zshrc
+++ b/.zshrc
@@ -20,47 +20,15 @@ HISTFILE=~/.zsh_history
source $HOME/.path
source $HOME/.env
+source $HOME/.aliases
+source $HOME/.functions
[[ -r /usr/share/z/z.sh ]] && source /usr/share/z/z.sh
[[ -r /usr/local/etc/profile.d/z.sh ]] && source /usr/local/etc/profile.d/z.sh
-# System Specific
-case `uname` in
-Darwin)
- # Alias
- alias ll='ls -lhG'
-
- source ~/.macos
-;;
-Linux)
- # commands for Linux
-;;
-FreeBSD)
- # commands for FreeBSD
-;;
-esac
-
-# zplug
-if [ ! -d ~/.zplug ]; then
- echo 'Installing zplug ... '
- git clone https://github.com/zplug/zplug.git ~/.zplug
-fi
-source ~/.zplug/init.zsh
-zplug "plugins/git", from:oh-my-zsh
-zplug "zsh-users/zsh-completions"
-zplug "zsh-users/zsh-syntax-highlighting"
-zplug "dracula/zsh", as:theme
-if ! zplug check --verbose; then
- printf "Install? [y/N]: "
- if read -q; then
- echo; zplug install
- fi
-fi
-zplug load
-
-source $HOME/.aliases
-source $HOME/.functions
-[ -f $HOME/.zsh_local ] && source $HOME/.zsh_local
+[ -r $HOME/.zplugrc ] && source $HOME/.zplugrc
+[ -r $HOME/.nnnrc ] && source $HOME/.nnnrc
+[ -r $HOME/.fzfrc ] && source $HOME/.fzfrc
-[ -f $HOME/.nnnrc ] && source $HOME/.nnnrc
-[ -f $HOME/.fzfrc ] && source $HOME/.fzfrc
+[[ $(uname) == Darwin ]] && [ -r $HOME/.macos ] && source $HOME/.macos
+[ -r $HOME/.zsh_local ] && source $HOME/.zsh_local