zsh prompt and hostname
I use the following prompt in .zshrc: PROMPT="%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%1~ %{$reset_color%}%# " When I open terminal I see this prompt: zoltan@zoltan-Macbook-Pro ~ % Is it possible to drop the text "zoltan" in the hostname? I would like to make it look like this: zoltan@Macbook-Pro ~ % Any suggestion would be greatly appreciated. Thank you! It's a bit of a mess, but you can pretend the %m is a parameter and use parameter expansion to strip the zoltan from the host name: PROMPT="...${${(%):-%m}#1} ..." A little explanation. First, you create a "parameter