aboutsummaryrefslogtreecommitdiff
path: root/zsh/zshrc.d/prompt.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/zshrc.d/prompt.zsh')
-rw-r--r--zsh/zshrc.d/prompt.zsh12
1 files changed, 6 insertions, 6 deletions
diff --git a/zsh/zshrc.d/prompt.zsh b/zsh/zshrc.d/prompt.zsh
index 980d8669..245f2973 100644
--- a/zsh/zshrc.d/prompt.zsh
+++ b/zsh/zshrc.d/prompt.zsh
@@ -8,22 +8,23 @@ prompt() {
on)
setopt promptsubst promptpercent
- # 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'%m:'
fi
PS1=$PS1'%~'
- # Add sub-commands; VCS, job, and return status checks
- PS1=$PS1'$(ret=$?;prompt vcs;prompt job;prompt ret)'
-
# Add a helpful prefix if this shell appears to be exotic
case ${SHELL##*/} in
(zsh) ;;
(*) PS1=zsh:$PS1 ;;
esac
+ # Add sub-commands:
+ ## VCS, job, and return status checks as suffixes
+ PS1=$PS1'$(ret=$?;prompt vcs;prompt job;prompt ret)'
+
# Add prefix and suffix
PS1='${PROMPT_PREFIX}'$PS1'${PROMPT_SUFFIX}'
@@ -53,7 +54,6 @@ prompt() {
fi
;;
- # Git prompt function
git)
# Wrap as compound command; we don't want to see output from any of