From 69c0cfeac5d70661763b30f2474c08eacc0321ac Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Fri, 12 Jun 2020 16:22:24 +0100 Subject: Add aliases --- .config/aliasrc | 4 ++++ .config/bashrc | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 .config/aliasrc 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" -- cgit v1.2.3-13-gbd6f