From a60fb1e5e3d0bdbdbb32eed0865d70a8d8df01a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20B=C3=BCckendorf?= Date: Mon, 3 Dec 2018 13:39:22 +0100 Subject: [PATCH] .bashrc: outsourced custom configs to .bashrc.d/ This makes it easier among other things to not share everything --- .bashrc | 11 +++++------ .bashrc.d/dotfiles.bashrc | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .bashrc.d/dotfiles.bashrc diff --git a/.bashrc b/.bashrc index e954ea3..4746128 100644 --- a/.bashrc +++ b/.bashrc @@ -2,11 +2,10 @@ # Source global definitions if [ -f /etc/bashrc ]; then - . /etc/bashrc + . /etc/bashrc fi -alias dotfiles="git -c include.path=$HOME/.dotfiles/dotgit_config --git-dir=$HOME/.dotgit/ --work-tree=$HOME" - -# I should later write this as a function that checks for the existence of a -# venv subdirectory -alias activate="source venv/bin/activate" +# Source .bashrc.d +for file in ~/.bashrc.d/*.bashrc; do + . "$file" +done diff --git a/.bashrc.d/dotfiles.bashrc b/.bashrc.d/dotfiles.bashrc new file mode 100644 index 0000000..8b7ebfc --- /dev/null +++ b/.bashrc.d/dotfiles.bashrc @@ -0,0 +1,2 @@ +alias dotfiles="git -c include.path=$HOME/.dotfiles/dotgit_config --git-dir=$HOME/.dotgit/ --work-tree=$HOME" +complete -o bashdefault -o default -o nospace -F __git_wrap__git_main dotfiles