From d1e0ce0c6a704ef4158c94a623fa631869dc43ef Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Wed, 15 May 2019 16:42:44 -0400 Subject: [PATCH] show hostname in prompt whenever sudo --- brc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/brc b/brc index 78d28e3..e03b0b5 100644 --- a/brc +++ b/brc @@ -2089,13 +2089,10 @@ if [[ $- == *i* ]]; then bind -m vi-command W:shell-forward-word fi - if [[ $SSH_CLIENT ]]; then + if [[ $SSH_CLIENT || $SUDO_USER ]]; then PS1="\h $PS1" fi - - - prompt-command() { local return=$? # this MUST COME FIRST local psc pst ps_char ps_color stale_subvol -- 2.30.2