diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-04-22 12:12:38 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-04-22 12:14:55 +1200 |
commit | 044b3ff40697d9ae0d8e708a2e0c5320db0158e0 (patch) | |
tree | da254a8532c070712d96260c80cfcae020f61810 /zsh | |
parent | Use XDG base directories for .dotfiles.conf (diff) | |
download | dotfiles-044b3ff40697d9ae0d8e708a2e0c5320db0158e0.tar.gz dotfiles-044b3ff40697d9ae0d8e708a2e0c5320db0158e0.zip |
Use XDG base directories for shell keep() funcs
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/zshrc.d/keep.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zsh/zshrc.d/keep.zsh b/zsh/zshrc.d/keep.zsh index 869d2039..ddcb96e2 100644 --- a/zsh/zshrc.d/keep.zsh +++ b/zsh/zshrc.d/keep.zsh @@ -29,7 +29,7 @@ keep() { # Figure out the directory to which we're reading and writing these scripts local zshkeep - zshkeep=${ZSHKEEP:-"$HOME"/.zshkeep.d} + zshkeep=${XDG_DATA_HOME:-"$HOME"/.local/share}/zshkeep mkdir -p -- "$zshkeep" || return # Parse options @@ -141,7 +141,7 @@ EOF } # Load any existing scripts in zshkeep -for zshkeep in "${ZSHKEEP:-"$HOME"/.zshkeep.d}"/*.zsh(N) ; do +for zshkeep in "${XDG_DATA_HOME:-"$HOME"/.local/share}"/zshkeep/*.zsh ; do [[ -e $zshkeep ]] || continue source "$zshkeep" done |