I have a development server hosted on Digital Ocean, using Ubuntu 14.04. I switched my shell to ZSH and decided to go with the Agnoster theme. In order to get user@hostname
to stop showing, I set the DEFAULT_USER
in my .zshrc file.
For some reason on the ubuntu server, that's not working. The hostname still shows, and will not go away. I'm doing the exact same thing on my Mac OSX, and it works fine.
Here are some screenshots:
Anyone know what's going on? I even tried DEFAULT_USER="$USER@$HOST"
with no luck.
If I go back to the default, Robby Russell theme, it works just fine.
It is the feature according to this; when we are ssh
ing, the hostname will be shown.
Overriding the function prompt_context
or build_prompt
on Agnoster theme will rescue. Putting below snippets at the very end of the ~/.zshrc
for example.
# redefine prompt_context for hiding user@hostname
prompt_context () { }