diff options
author | xyz <gky44px1999@gmail.com> | 2021-08-13 20:23:22 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-08-13 20:23:22 -0700 |
commit | ceb390c840788a8db4238e8c8bc6e0b996290798 (patch) | |
tree | ee402540d64c977aeb0230c1f0979285d3687b2a /.bash_profile | |
parent | a5b58972bfcea12b608871f7d4c9a147943f3320 (diff) |
export XDG_XXX_DIR env var in user-dirs.dirs, refactor
Diffstat (limited to '.bash_profile')
-rw-r--r-- | .bash_profile | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/.bash_profile b/.bash_profile index 54538100..6cd46928 100644 --- a/.bash_profile +++ b/.bash_profile @@ -2,12 +2,26 @@ # ~/.bash_profile # -[[ -f ~/.bashrc ]] && . ~/.bashrc +# here `. ~/.bashrc` same as `source ~/.bashrc`, see `source filename` in `man bash`, and `. file` in `man dash` +# `. file` is POSIX compliant, while `source file` is not +# https://github.com/koalaman/shellcheck/wiki/SC3046 +#[[ -f ~/.bashrc ]] && . ~/.bashrc +[ -f ~/.bashrc ] && . ~/.bashrc export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" export XDG_DATA_HOME="$HOME/.local/share" +. "$XDG_CONFIG_HOME/user-dirs.dirs" +export XDG_DESKTOP_DIR="$XDG_DESKTOP_DIR" +export XDG_DOWNLOAD_DIR="$XDG_DOWNLOAD_DIR" +export XDG_TEMPLATES_DIR="$XDG_TEMPLATES_DIR" +export XDG_PUBLICSHARE_DIR="$XDG_PUBLICSHARE_DIR" +export XDG_DOCUMENTS_DIR="$XDG_DOCUMENTS_DIR" +export XDG_MUSIC_DIR="$XDG_MUSIC_DIR" +export XDG_PICTURES_DIR="$XDG_PICTURES_DIR" +export XDG_VIDEOS_DIR="$XDG_VIDEOS_DIR" + export PATH="$(find ~/.local/bin -type d -printf %p:)$PATH" export HISTSIZE=5000 export HISTFILESIZE=5000 |