[bash] Fix bash profile initialization
Removed automatic initializations of zsh functions. Fixed not calling correct folders for bash aliases, environment variables and profile settings.
This commit is contained in:
parent
ce4473bf9f
commit
1ae92cfc2a
4 changed files with 40 additions and 28 deletions
|
|
@ -1,13 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# ~/.bash_profile
|
||||
#
|
||||
# shellcheck disable=SC1090
|
||||
|
||||
if [ -d $XDG_CONFIG_HOME/shell/login.d ]; then
|
||||
for file in $XDG_CONFIG_HOME/shell/login.d/*.sh; do
|
||||
source $file
|
||||
done
|
||||
# load global sh env vars
|
||||
[ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env"
|
||||
if [ -d "$XDG_CONFIG_HOME/sh/env.d" ]; then
|
||||
for _env in "$XDG_CONFIG_HOME/sh/env.d"/*.sh; do
|
||||
. "$_env"
|
||||
done
|
||||
unset _env
|
||||
fi
|
||||
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
# load profile files vars
|
||||
[ -f "$XDG_CONFIG_HOME/sh/profile" ] && source "$XDG_CONFIG_HOME/sh/profile"
|
||||
if [ -d "$XDG_CONFIG_HOME/sh/profile.d" ]; then
|
||||
for _profile in "$XDG_CONFIG_HOME/sh/profile.d"/*.sh; do
|
||||
. "$_profile"
|
||||
done
|
||||
unset _profile
|
||||
fi
|
||||
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
# shellcheck disable=SC1090
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue