From c63825e0a18a98bcc13ad9835936c84cbf56b7d4 Mon Sep 17 00:00:00 2001 From: Ravi R Kiran Date: Sun, 29 Dec 2019 17:41:55 -0600 Subject: Modify PS1 only for interactive shells Login shells are non-interactive and set terminal type to dumb. diff --git a/.bashrc b/.bashrc index dd8b633..2212fee 100644 --- a/.bashrc +++ b/.bashrc @@ -17,11 +17,6 @@ alias rm='rm -i' alias l='less -N' alias dotgit='/usr/bin/git --git-dir=$HOME/code/dotfiles.git --work-tree=$HOME' -# Emacs tramp wants a simple prompt that it can recognize -if [[ "$TERM" = "dumb" ]]; then - export PS1="> " -fi - # Add to path cleanly local_pathmunge () { case ":${PATH}:" in @@ -149,6 +144,11 @@ case "$-" in source_first /usr/share/fzf/shell/key-bindings.bash ~/.fzf.bash eval "$(~/usr/local/bin/fasd --init auto)" complete -d j + + # Emacs tramp wants a simple prompt that it can recognize + if [[ "$TERM" = "dumb" ]]; then + PS1="> " + fi ;; *) # Non-interactive shells -- cgit v0.10.1