diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2020-06-12 16:22:24 +0100 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2020-06-12 16:22:24 +0100 |
| commit | 69c0cfeac5d70661763b30f2474c08eacc0321ac (patch) | |
| tree | c9a02cbde2d7015ce11dfe1b35b162329acb084b | |
| parent | 5fe45af814e9f96dac8b3225e2d9b593f9669e5c (diff) | |
Add aliases
| -rw-r--r-- | .config/aliasrc | 4 | ||||
| -rw-r--r-- | .config/bashrc | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/.config/aliasrc b/.config/aliasrc new file mode 100644 index 0000000..ff96ea0 --- /dev/null +++ b/.config/aliasrc @@ -0,0 +1,4 @@ +# The $HOME directory is the working directory for the bare dotfiles git repo. +# As such we can't use the git command in this directory if we want to work with the repo. +# Instead the dotfiles alias is used. +alias dotfiles='/usr/bin/git --git-dir=$HOME/.local/src/ --work-tree=$HOME' diff --git a/.config/bashrc b/.config/bashrc index 558cc76..1207f13 100644 --- a/.config/bashrc +++ b/.config/bashrc @@ -8,3 +8,10 @@ # Adds `~/.local/bin` to $PATH export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')" +# Keep the home directory tidy. +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CACHE_HOME="$HOME/.cache" + +# Load aliases if they exist. +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc" |
