aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-04-22 12:12:38 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-04-22 12:14:55 +1200
commit044b3ff40697d9ae0d8e708a2e0c5320db0158e0 (patch)
treeda254a8532c070712d96260c80cfcae020f61810 /bash/bashrc.d
parentUse XDG base directories for .dotfiles.conf (diff)
downloaddotfiles-044b3ff40697d9ae0d8e708a2e0c5320db0158e0.tar.gz
dotfiles-044b3ff40697d9ae0d8e708a2e0c5320db0158e0.zip
Use XDG base directories for shell keep() funcs
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/keep.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/keep.bash b/bash/bashrc.d/keep.bash
index 6796aae7..2e2424a3 100644
--- a/bash/bashrc.d/keep.bash
+++ b/bash/bashrc.d/keep.bash
@@ -29,7 +29,7 @@ keep() {
# Figure out the directory to which we're reading and writing these scripts
local bashkeep
- bashkeep=${BASHKEEP:-"$HOME"/.bashkeep.d}
+ bashkeep=${XDG_DATA_HOME:-"$HOME"/.local/share}/bashkeep
mkdir -p -- "$bashkeep" || return
# Parse options
@@ -140,7 +140,7 @@ EOF
}
# Load any existing scripts in bashkeep
-for bashkeep in "${BASHKEEP:-"$HOME"/.bashkeep.d}"/*.bash ; do
+for bashkeep in "${XDG_DATA_HOME:-"$HOME"/.local/share}"/bashkeep/*.bash ; do
[[ -e $bashkeep ]] || continue
source "$bashkeep"
done