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 /bash | |
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 'bash')
-rw-r--r-- | bash/bash_completion.d/keep.bash | 2 | ||||
-rw-r--r-- | bash/bashrc.d/keep.bash | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bash/bash_completion.d/keep.bash b/bash/bash_completion.d/keep.bash index 4b479eca..8bb4615f 100644 --- a/bash/bash_completion.d/keep.bash +++ b/bash/bash_completion.d/keep.bash @@ -44,7 +44,7 @@ _keep() { fi # Build list of kept names - bashkeep=${BASHKEEP:-"$HOME"/.bashkeep.d} + bashkeep=${XDG_DATA_HOME:-"$HOME"/.local/share}/bashkeep for keep in "$bashkeep"/"$2"*.bash ; do # Skip directories ! [[ -d $keep ]] || continue 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 |