Complete reimplementation to support cross platform usage without namespaces

This commit is contained in:
2025-11-05 18:21:30 -05:00
parent 3085ead539
commit 7d81e68049
24 changed files with 263 additions and 128 deletions

35
bashrc.sh Normal file
View 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