Drew Drew - 3 months ago 20x
Bash Question

ZSH Agnoster Theme showing machine name

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

to stop showing, I set the
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:

enter image description here

enter image description here

Anyone know what's going on? I even tried
with no luck.

If I go back to the default, Robby Russell theme, it works just fine.

enter image description here


It is the feature according to this; when we are sshing, 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 () { }