From e2caa321de09a39b5549b0e9cc89003e3f4b998c Mon Sep 17 00:00:00 2001 From: Daniil Fajnberg Date: Thu, 18 Nov 2021 09:19:33 +0100 Subject: [PATCH] bash prompt skipped when non-interactive --- bash/.config/bash/prompt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bash/.config/bash/prompt b/bash/.config/bash/prompt index d036c88..42970f5 100644 --- a/bash/.config/bash/prompt +++ b/bash/.config/bash/prompt @@ -7,6 +7,9 @@ # Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles # iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM='gnome-256color'; elif infocmp xterm-256color >/dev/null 2>&1; then