bash prompt skipped when non-interactive

This commit is contained in:
Daniil Fajnberg 2021-11-18 09:19:33 +01:00
parent b4a4d90ac8
commit e2caa321de
1 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,9 @@
# Heavily inspired by @necolass 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