mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
Prevent bash to source-bashrc-because-ssh when obviously non-interactive
See: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html The bash "cleverness" applies even to deply nested `bash -c`, e.g direnv.
This commit is contained in:
parent
fdb7fec9aa
commit
d50534572d
1 changed files with 4 additions and 0 deletions
4
bash/rc
4
bash/rc
|
|
@ -1,5 +1,9 @@
|
||||||
## bashrc, called for interactive shells
|
## bashrc, called for interactive shells
|
||||||
|
|
||||||
|
if [[ $- != *i* ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
[[ -z "$DOTFILES_ROOT_DIR" ]] && source "$HOME/.dotfilesrc"
|
[[ -z "$DOTFILES_ROOT_DIR" ]] && source "$HOME/.dotfilesrc"
|
||||||
|
|
||||||
source $DOTFILES_SHELL_DIR/aliases
|
source $DOTFILES_SHELL_DIR/aliases
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue