summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gregoire@awhk.org>2026-05-04 18:02:39 +0100
committerGrégoire Duchêne <gregoire@awhk.org>2026-05-04 18:02:39 +0100
commitaf33a705e74c02bf70fb20449af23c59ada8996c (patch)
tree05f6c4b0dc7485d7ea449ff49d88c39e63f91a9f
parent7da66388b2c734cb3b47e45e24aa9f1974522e3b (diff)
zsh: Use short prompt on local machinesHEADmaster
-rw-r--r--zsh/rc6
1 files changed, 5 insertions, 1 deletions
diff --git a/zsh/rc b/zsh/rc
index 7e71a48..c4f5f66 100644
--- a/zsh/rc
+++ b/zsh/rc
@@ -21,7 +21,11 @@ zstyle ':completion:*' users root ${USER}
HISTFILE=${XDG_CACHE_HOME}/zsh/history
HISTSIZE=65535
-PS1='%(?..%F{#ff0000}%?%f )%n@%m:%~ %# '
+if [[ -z ${SSH_CLIENT} ]]; then
+ PS1='%(?..%F{#ff0000}%?%f )%~ %# '
+else
+ PS1='%(?..%F{#ff0000}%?%f )%n@%m:%~ %# '
+fi
SAVEHIST=${HISTSIZE}
WORDCHARS=${WORDCHARS/\//}