Migrate zsh config to XDG base dir location

.zshenv still needs to live in ~ for bootstrapping, but everything else
is now squirrelled away in ~/.config/zsh instead.

Note that zplug still lives in ~/.zplug - it should be relocated too but
hasn't been yet.
This commit is contained in:
Danielle McLean 2016-10-06 09:21:16 +11:00
parent d497345c6d
commit 8273e0ce15
29 changed files with 14 additions and 10 deletions

1
.config/zsh/.zprofile Symbolic link
View file

@ -0,0 +1 @@
zprofile

1
.config/zsh/.zshrc Symbolic link
View file

@ -0,0 +1 @@
zshrc

View file

@ -1,5 +1,5 @@
#! zsh
HISTFILE=~/.zsh/zhistory
HISTFILE=$XDG_DATA_HOME/zsh/history
HISTSIZE=50000
SAVEHIST=$HISTSIZE

View file

@ -0,0 +1 @@
../../../../../.iterm2_shell_integration.zsh

View file

@ -1,5 +1,5 @@
#! zsh
fpath=(~/.zsh/functions $fpath)
fpath=($ZDOTDIR/functions $fpath)
# filter out duplicates, nonexistent directories, and . (the current directory)
fpath=(${(u)^fpath:#.}(N))

View file

@ -22,6 +22,6 @@ apply-trapd00r-colors() {
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
}
zplug ~/.zsh/interactive/\*, from:local
zplug $ZDOTDIR/interactive/\*, from:local
zplug check || zplug install
zplug load

1
.config/zsh/zprofile Normal file
View file

@ -0,0 +1 @@
for f in $ZDOTDIR/login/*(-.N); source $f

1
.config/zsh/zshenv Normal file
View file

@ -0,0 +1 @@
for f in $ZDOTDIR/all/*(-.N); source $f

2
.config/zsh/zshrc Normal file
View file

@ -0,0 +1,2 @@
source $ZDOTDIR/zplug
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/*(-.N); source $f

View file

@ -1,3 +1,2 @@
^/\.git
^/\.stow-no-fold
^/README\.md

View file

@ -1 +0,0 @@
.zsh/zhistory

View file

@ -1 +0,0 @@
for f in ~/.zsh/login/*(-.N); source $f

View file

@ -1 +0,0 @@
../../../../.iterm2_shell_integration.zsh

View file

@ -1 +1,4 @@
for f in ~/.zsh/all/*(-.N); source $f
: ${XDG_CONFIG_HOME:=~/.config} ${XDG_CACHE_HOME:=~/.cache} ${XDG_DATA_HOME:=~/.local/share}
export XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME
: ${ZDOTDIR:=$XDG_CONFIG_HOME/zsh}
source $ZDOTDIR/zshenv

2
.zshrc
View file

@ -1,2 +0,0 @@
source ~/.zsh/zplug
[[ -o login ]] && for f in ~/.zsh/interactive+login/*(-.N); source $f