From 427cc260c67e1d4096547f204aac47a5db4b6b28 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Sun, 6 Dec 2020 13:00:25 -0800 Subject: [PATCH] Move bash for stow --- bashrc => bash/.bashrc | 14 ++++++++------ bash/{aliases => .config/bash/aliases.sh} | 0 bash/{completion => .config/bash/completion.sh} | 0 bash/{environment => .config/bash/environment.sh} | 0 bash/{functions => .config/bash/functions.sh} | 0 bash/{path => .config/bash/path.sh} | 0 bash/{prompt => .config/bash/prompt.sh} | 0 7 files changed, 8 insertions(+), 6 deletions(-) rename bashrc => bash/.bashrc (80%) rename bash/{aliases => .config/bash/aliases.sh} (100%) rename bash/{completion => .config/bash/completion.sh} (100%) rename bash/{environment => .config/bash/environment.sh} (100%) rename bash/{functions => .config/bash/functions.sh} (100%) rename bash/{path => .config/bash/path.sh} (100%) rename bash/{prompt => .config/bash/prompt.sh} (100%) diff --git a/bashrc b/bash/.bashrc similarity index 80% rename from bashrc rename to bash/.bashrc index 2f8bfae..209a36f 100644 --- a/bashrc +++ b/bash/.bashrc @@ -14,13 +14,15 @@ if [[ ! "${BASH_VERSION}" = "3.2*" ]]; then shopt -s autocd fi +CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/bash" + source-file /etc/bash_completion -source-file ~/.bash/environment -source-file ~/.bash/aliases -source-file ~/.bash/functions -source-file ~/.bash/path -source-file ~/.bash/prompt -source-file ~/.bash/completion +source-file "${CONFIG}/environment.sh" +source-file "${CONFIG}/aliases.sh" +source-file "${CONFIG}/functions.sh" +source-file "${CONFIG}/path.sh" +source-file "${CONFIG}/prompt.sh" +source-file "${CONFIG}/completion.sh" source-file ~/opt/bash/env unset -f source-file diff --git a/bash/aliases b/bash/.config/bash/aliases.sh similarity index 100% rename from bash/aliases rename to bash/.config/bash/aliases.sh diff --git a/bash/completion b/bash/.config/bash/completion.sh similarity index 100% rename from bash/completion rename to bash/.config/bash/completion.sh diff --git a/bash/environment b/bash/.config/bash/environment.sh similarity index 100% rename from bash/environment rename to bash/.config/bash/environment.sh diff --git a/bash/functions b/bash/.config/bash/functions.sh similarity index 100% rename from bash/functions rename to bash/.config/bash/functions.sh diff --git a/bash/path b/bash/.config/bash/path.sh similarity index 100% rename from bash/path rename to bash/.config/bash/path.sh diff --git a/bash/prompt b/bash/.config/bash/prompt.sh similarity index 100% rename from bash/prompt rename to bash/.config/bash/prompt.sh