Looks different on Ubuntu?
agarzon opened this issue · 2 comments
Bug Report
Current Behavior
The prompt looks different in Ubuntu than CentOS.
I have dozens of servers and recently I decided to normalize all about fish and fisherman (I use ansible for uniform management) so the installation process for all servers was identical. All servers run the exact same versions and configurations... but, the ones using Ubuntu are not showing the first prompt line (the one that contains user, host, path).
Expected Behavior
The prompt should be the same always regardless the distro.
Relevant Fish
Configuration
Plugins used in both systems:
jethrokuan/z
matchai/spacefish
laughedelic/pisces
brgmnn/fish-docker-compose
Environment
- Spacefish version: 2.2.4
- Fish version: 2.7.1
- Fish plugin manager: fisher 3.2.7
- Terminal emulator: Gnome Terminal 3.28.2
- Operating system: Ubuntu 18.04
Possible Solution
No idea
Additional context/Screenshots
Interesting find @agarzon 🤔
The criteria for the username to appear in the prompt is for any of the following to be true:
$LOGNAME
!=$USER
$UID
= 0$SSH_CONNECTION
has a non-zero length
The "vps" portion is the hostname, whose criteria is that $SSH_CONNECTION
has a non-zero length.
Both of those being the case, it would make sense to me that these sections aren't showing if the Ubuntu installation, for whatever reason, doesn't have a $SSH_CONNECTION
value.
Would you be able to look into whether these environment variables are set on your Ubuntu installation?
My bad, I assumed that the prompt will be homogeneous local or remote indistinctly. I was not aware of the SPACEFISH_USER_SHOW variable. https://spacefish.matchai.me/docs/Options.html#username-user
In my specific report, Ubuntu was checked locally and CentOS remotely. So it behaves in the way as it was programmed.
This setting fix it in they way I was spectating.
set SPACEFISH_USER_SHOW always
So, closing this issue. Thank you.