[ADD][SHELL] Project-local environment w/ localrc

This little script will look at your current working directory and its
parent directories to source local configuration files (very useful for
Python  projects, or the way I build TC with a local PATH pre-pended).

It works relatively well but still is a very fragile solution that
depends on the order in which the shell has sourced its files. Because
the Termite script kept erasing the previous PROMPT_COMMAND value for
Bash I had to change to source it at the beginning of my configuration
file.
This commit is contained in:
Bruno BELANYI 2019-10-19 16:40:46 +02:00
parent 62ce5480bc
commit 67da1d9f6e
4 changed files with 137 additions and 17 deletions

View file

@ -5,6 +5,14 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Export our directory to Termite for opening new terminals
if [[ $TERM == xterm-termite ]]; then
. /etc/profile.d/vte.sh
__vte_prompt_command
fi
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# Make colorcoding available for everyone
Black='\e[0;30m' # Black
@ -54,11 +62,3 @@ source ~/.profile
# Import my prompt
source ~/.bash_prompt
# Export our directory to Termite for opening new terminals
if [[ $TERM == xterm-termite ]]; then
. /etc/profile.d/vte.sh
__vte_prompt_command
fi
[ -f ~/.fzf.bash ] && source ~/.fzf.bash