From a6c5dcea7c903145a0ef943de5cf5471043f6272 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Fri, 29 Dec 2023 15:23:50 -0500 Subject: [PATCH] feat(bash): don't run bashrc is shell not interactive --- common/home/bash/config/bashrc | 1 - common/home/bash/default.nix | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/home/bash/config/bashrc b/common/home/bash/config/bashrc index 92fd9542..05b0746a 100644 --- a/common/home/bash/config/bashrc +++ b/common/home/bash/config/bashrc @@ -1,5 +1,4 @@ # Check git status of nix configs - fetchNix() {( cd ~/.nix || exit 1 git fetch --all --quiet diff --git a/common/home/bash/default.nix b/common/home/bash/default.nix index 8939d8c2..7fa08c67 100644 --- a/common/home/bash/default.nix +++ b/common/home/bash/default.nix @@ -129,6 +129,9 @@ #profileExtra = '' #''; bashrcExtra = '' + # Check if shell is interactive + [[ $- == *i* ]] || return 0 + ${lib.strings.fileContents ./config/dracula/less.sh} ${lib.strings.fileContents ./config/dracula/fzf.sh}