Ensure .profile is loaded by shells.
Took this code out of /etc/profile and /etc/bashrc from NixOS
This commit is contained in:
parent
1739eb4ecc
commit
bb11db42a5
15
bash/.bashrc
15
bash/.bashrc
@ -29,22 +29,29 @@ export PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_C
|
||||
|
||||
#{- SOURCING -}#
|
||||
|
||||
# Source aliases
|
||||
|
||||
# Source profile, if it hasn't already been loaded
|
||||
if [ -z "$__PROFILE_DONE" ]; then
|
||||
. $HOME/.profile
|
||||
fi
|
||||
|
||||
|
||||
# Source aliases, if they exist
|
||||
if [ -f "$HOME/.aliases" ] && [ -r "$HOME/.aliases" ]; then
|
||||
. "$HOME/.aliases"
|
||||
fi
|
||||
|
||||
# Source private aliases
|
||||
# Source private aliases, if they exist
|
||||
if [ -f "$HOME/.private_aliases" ] && [ -r "$HOME/.private_aliases" ]; then
|
||||
. "$HOME/.private_aliases"
|
||||
fi
|
||||
|
||||
# Source functions
|
||||
# Source functions, if they exist
|
||||
if [ -f "$HOME/.functions" ] && [ -r "$HOME/.functions" ]; then
|
||||
. "$HOME/.functions"
|
||||
fi
|
||||
|
||||
# Source private functions
|
||||
# Source private functions, if they exist
|
||||
if [ -f "$HOME/.private_functions" ] && [ -r "$HOME/.private_functions" ]; then
|
||||
. "$HOME/.private_functions"
|
||||
fi
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
#{- ~/.profile -}#
|
||||
|
||||
# Only execute this file once per shell
|
||||
if [ -n "$__PROFILE_SOURCED" ]; then return; fi
|
||||
export __PROFILE_SOURCED=1
|
||||
|
||||
#{- PATH -}#
|
||||
|
||||
# Prepend ~/.local/bin to the path and append the current directory to the path
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user