Skip to content

Commit

Permalink
Treat 'dumb' terminals as non-interactive as well (for TRAMP)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Bennee committed Oct 29, 2010
1 parent 0c73232 commit 126f32f
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions dotbashrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ if [ "$SSH_CLIENT" != "" ]; then
fi
fi

# Assume that dumb terminal logins are from TRAMP
if [ "${TERM}" != "" ]; then
if [ "${TERM}" == "dumb" ]; then
INTERACTIVE=false
fi
fi

#if [ "$INTERACTIVE" == "true" ]; then
# echo "Assuming interactive shell"
#fi
Expand Down Expand Up @@ -441,8 +448,9 @@ ps_proc="\[${cache_colour_m_purp}\]$PROC\[${cache_colour_end}\]"


# Setup the prompt to show who I am and on what machine, what processor and my SCM state
export PS1="\A \u@\h/${ps_proc} [\W] >"

if [ "$INTERACTIVE" == "true" ]; then
export PS1="\A \u@\h/${ps_proc} [\W] >"
fi

# We want to extract the screen session name (if it exisits) from STY
function ps_xterm_f()
Expand Down Expand Up @@ -521,18 +529,17 @@ if [ "$INTERACTIVE" == "true" ]; then
fi
unset KVM

# Screen Tweaks
SCREEN=$(find_alternatives "screen")
if [[ -f $SCREEN && -f $HOME/.bashrc_screen ]]; then
source $HOME/.bashrc_screen
fi

# GPG Agent
SCREEN=$(find_alternatives "gpg-agent")
if [[ -f $SCREEN && -f $HOME/.bashrc_gpg ]]; then
source $HOME/.bashrc_gpg
fi

# Screen Tweaks
SCREEN=$(find_alternatives "screen")
if [[ -f $SCREEN && -f $HOME/.bashrc_screen ]]; then
source $HOME/.bashrc_screen
fi

# Any machine specific stuff
HOST_BASHRC="$HOME/.bashrc_`hostname`"
Expand Down

0 comments on commit 126f32f

Please sign in to comment.