소스 검색

Fix warnings appearing in non-interactive bash shells

Encountered issues when using dotfiles in vagrant boxes. For
non-interactive shells, we load only the environmental settings
Weiyi Lou 10 년 전
부모
커밋
180cc143ef
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      shell/bashrc

+ 3 - 0
shell/bashrc

@@ -1,5 +1,8 @@
 source ~/dotfiles/shell/env
 
+# Only load interactive settings when in interactive shells.
+[[ $- != *i* ]] && return
+
 source ~/dotfiles/shell/common/load
 
 for file in ~/dotfiles/shell/bash/*.bash; do