Complete reimplementation to support cross platform usage without namespaces
This commit is contained in:
35
bashrc.sh
Normal file
35
bashrc.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
# .bashrc
|
||||
|
||||
# Source global definitions
|
||||
if [ -f /etc/bashrc ]; then
|
||||
. /etc/bashrc
|
||||
fi
|
||||
|
||||
if [ -f '/run/.toolboxenv' ]; then
|
||||
export LOCATION="Toolbox: $(cat /run/.containerenv | grep name | cut -d '=' -f 2)"
|
||||
else
|
||||
export LOCATION="Host: $(hostname)"
|
||||
fi
|
||||
|
||||
export HISTFILE="$HOME/.bash_history"
|
||||
export PYTHON_HISTORY="$HOME/.python_history"
|
||||
|
||||
# User specific environment
|
||||
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
|
||||
then
|
||||
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
||||
fi
|
||||
export PATH
|
||||
|
||||
# Uncomment the following line if you don't like systemctl's auto-paging feature:
|
||||
# export SYSTEMD_PAGER=
|
||||
|
||||
# Basically this is here to support the nonsense I'm doing with toolbox alt-home
|
||||
# locations. This determines the current path of the current script so that we
|
||||
# don't need to hardcode paths
|
||||
currdir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
|
||||
|
||||
for b in ${currdir}/.config/bashrc.d/*.sh; do source $b; done
|
||||
for c in ${currdir}/.config/completions.d/*.completion; do source $c; done
|
||||
|
||||
unset currdir
|
||||
Reference in New Issue
Block a user