Previously, the sessions contained only explicitly exported variables and functions. This was fragile and in part buggy due to lacking exports. Interactive features like user-defined aliases and functions are still working as before.
6 lines
339 B
Bash
6 lines
339 B
Bash
# Start an interactive bash session in the current bash environment.
|
|
|
|
# BASH_ENVIRONMENT contains definitions of read-only variables like 'BASHOPTS' that
|
|
# cause warnings on importing. Suppress these warnings during bash startup.
|
|
BASH_ENVIRONMENT=<(declare -p; declare -pf) \
|
|
bash --rcfile <(echo 'source $BASH_ENVIRONMENT 2>/dev/null')
|