From af33a705e74c02bf70fb20449af23c59ada8996c Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Mon, 4 May 2026 18:02:39 +0100 Subject: zsh: Use short prompt on local machines --- zsh/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'zsh') 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/\//} -- cgit v1.3