zsh agnoster theme without hostname
I really like the agnoster theme for my terminal. But the hostname is just to long and not really useful on your local machine. That's why I searched for a way to remove it. And it's quite easy:
Just remove the @%m
to remove the hostname in the theme file .oh-my-zsh/themes
.
From
# Context: user@hostname (who am I and where am I)
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
fi
}
to
# Context: user@hostname (who am I and where am I)
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}