From d4ef30da0ae75001c20410da620d8263d1dcc928 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Wed, 18 Dec 2019 11:48:56 +0100 Subject: [PATCH] Only run .bashrc.dotfiles for interative shells. --- .bashrc.dotfiles | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.bashrc.dotfiles b/.bashrc.dotfiles index 390dc3e..1c9f486 100644 --- a/.bashrc.dotfiles +++ b/.bashrc.dotfiles @@ -1,9 +1,16 @@ # Common commands for .bashrc. Include by adding the following to .bashrc: # +# # Include cross-system common parts from .dotfiles.git repo # if [ -f ~/.bashrc.dotfiles ]; then # . ~/.bashrc.dotfiles # fi +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + # dotfiles alias alias dotfiles='git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME/'