When I ssh to a remote machine, by default the prompt changes to user@host, which I find super useful,
But the problem is that if I sudo -s then the prompt changes to simply $, and I see neither the user (who started sudo, nor the one that was sudo’d to) nor the hostname.
In effect, it’s impossible to tell a local sudo prompt from a remote one.
When I ssh to a remote machine, by default the prompt changes to
user@host
, which I find super useful,But the problem is that if I
sudo -s
then the prompt changes to simply$
, and I see neither the user (who started sudo, nor the one that was sudo’d to) nor the hostname.In effect, it’s impossible to tell a local sudo prompt from a remote one.
This issue (at least from the user PoV) may be somewhat related to https://github.com/oh-my-fish/theme-bobthefish/issues/170 – where the solution was to introduce an optional
(user)
prompt.From technical PoV (but I’m not a coder) I suspect the issue is that when you
sudo
, the new fish instance does not know it is in ssh.P.S. Love the theme. Thanks so much for this!
><> . . <3