Skip to content

Hostname disappears from prompt when sudo-ing on a remote server #306

@silverhook

Description

@silverhook

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 #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions