aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-08-09 19:26:12 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-08-09 19:26:12 +1200
commit79f1da9ffb26d24ae752491076df600c40b124ed (patch)
tree69cd6fce571d1df386bf98ec2c9862db17338e8d /bash
parentRestore tmux history to defaults (diff)
downloaddotfiles-79f1da9ffb26d24ae752491076df600c40b124ed.tar.gz
dotfiles-79f1da9ffb26d24ae752491076df600c40b124ed.zip
Better way to elide hostname prompt in screen/tmux
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/prompt.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index bdea7ace..e0a03438 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -14,9 +14,9 @@ prompt() {
PROMPT_DIRTRIM=4
fi
- # Basic prompt shape depends on whether we're in SSH or not
+ # Prompt has hostname via SSH outside of screen/tmux
PS1=
- if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then
+ if [[ -n $SSH_CLIENT && -z $STY && -z $TMUX ]] ; then
PS1=$PS1'\h:'
fi
PS1=$PS1'\w'