Complete reimplementation to support cross platform usage without namespaces
This commit is contained in:
13
container/profile.d/99-aliases.sh
Normal file
13
container/profile.d/99-aliases.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
alias dnf='echo "WARNING: Package installs should require a toolbox rebuild, use dnf-local to override"'
|
||||
alias dnf-local='command dnf'
|
||||
|
||||
alias prun="poetry run"
|
||||
alias psync="poetry install --sync"
|
||||
alias code='codium'
|
||||
alias ssh='ssh -F ~/.ssh/config'
|
||||
|
||||
alias bk='cd -'
|
||||
alias fuck='sudo $(history -p \!\!)'
|
||||
alias cls='clear'
|
||||
17
container/profile.d/99-load-user-bashrc.sh
Normal file
17
container/profile.d/99-load-user-bashrc.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# If we are running in a toolbox container that uses an alt home dir, then we
|
||||
# won't be automatically loading the global user bashrc, which is annoying becasue
|
||||
# I worked hard to make that bashrc very useful to me. So the below conditional
|
||||
# checks whether the user bashrc exists (because we can't load it if it isn't there)
|
||||
# and that the current home dir does not match the user home dir (because if it does
|
||||
# then we will have already loaded the bashrc when the shell spawned and we'll get
|
||||
# stuck in a loop)
|
||||
|
||||
if [ -f /var/home/"${USER}"/.bashrc ] && [ "${HOME}" != "/var/home/${USER}" ]; then
|
||||
source /var/home/"${USER}"/.bashrc;
|
||||
fi
|
||||
|
||||
if [ -f "${HOME}"/.bashrc ]; then
|
||||
source "${HOME}/.bashrc";
|
||||
fi
|
||||
Reference in New Issue
Block a user