Add a username/hostname section to the prompt#62
Add a username/hostname section to the prompt#62thenktor wants to merge 6 commits intojorgebucaran:mainfrom
Conversation
|
I would love to see this merged, I am looking for similar functionality. |
| set show_hostname true | ||
| end | ||
| end | ||
| end |
There was a problem hiding this comment.
Instead of performing all these checks on every prompt, given these parts of the environment wouldn't change during a given shell session, should this be cached?
I could also imagine there's scenarios where someone may wish to show the hostname, but this currently won't allow doing so on custom conditions.
There was a problem hiding this comment.
To be honest: I'm using the default fish prompt on all servers where one of these checks would turn on the show_hostname 😄 Probably a simple option hydro_always_show_hostname would be just as good, too. I cannot remember why I've added the automatic checks. Probably just because it was possible.
When connecting to remote hosts via ssh or when entering containers (Linux LXC, FreeBSD jails, Solaris zones) it is nice to see where you are working now. Therefore I've added a username/hostname section to the beginning of the prompt.
It always show username@hostname for remote/container prompts. You can set activate hydro_always_show_user to always show the username. Useful when using su to change user on local machines.
Fix for #50