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:
parent
d497345c6d
commit
8273e0ce15
29 changed files with 14 additions and 10 deletions
1
.config/zsh/.zprofile
Symbolic link
1
.config/zsh/.zprofile
Symbolic link
|
@ -0,0 +1 @@
|
|||
zprofile
|
1
.config/zsh/.zshrc
Symbolic link
1
.config/zsh/.zshrc
Symbolic link
|
@ -0,0 +1 @@
|
|||
zshrc
|
|
@ -1,5 +1,5 @@
|
|||
#! zsh
|
||||
HISTFILE=~/.zsh/zhistory
|
||||
HISTFILE=$XDG_DATA_HOME/zsh/history
|
||||
HISTSIZE=50000
|
||||
SAVEHIST=$HISTSIZE
|
||||
|
1
.config/zsh/interactive/iterm2
Symbolic link
1
.config/zsh/interactive/iterm2
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../../.iterm2_shell_integration.zsh
|
|
@ -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))
|
|
@ -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
1
.config/zsh/zprofile
Normal file
|
@ -0,0 +1 @@
|
|||
for f in $ZDOTDIR/login/*(-.N); source $f
|
1
.config/zsh/zshenv
Normal file
1
.config/zsh/zshenv
Normal file
|
@ -0,0 +1 @@
|
|||
for f in $ZDOTDIR/all/*(-.N); source $f
|
2
.config/zsh/zshrc
Normal file
2
.config/zsh/zshrc
Normal file
|
@ -0,0 +1,2 @@
|
|||
source $ZDOTDIR/zplug
|
||||
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/*(-.N); source $f
|
|
@ -1,3 +1,2 @@
|
|||
^/\.git
|
||||
^/\.stow-no-fold
|
||||
^/README\.md
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
.zsh/zhistory
|
|
@ -1 +0,0 @@
|
|||
for f in ~/.zsh/login/*(-.N); source $f
|
|
@ -1 +0,0 @@
|
|||
../../../../.iterm2_shell_integration.zsh
|
5
.zshenv
5
.zshenv
|
@ -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
2
.zshrc
|
@ -1,2 +0,0 @@
|
|||
source ~/.zsh/zplug
|
||||
[[ -o login ]] && for f in ~/.zsh/interactive+login/*(-.N); source $f
|
Loading…
Reference in a new issue