Currently an example line of my terminal will start with -> ~ git:(master)
But I'd like to update it to use the current user too: -> [tom] ~ git:(master)
Right now I'm using oh-my-zsh and I thought to override it, I'd add something to my .zshrc file, but I can't seem to find out where/what to add
You can use a zsh prompt expansion sequence
, found in the manual page for zshmisc
.
If you're using oh-my-zsh
it's a bit tricky: you need to figure out what theme you're using, then modify it to include the right prompt sequence. The themes are kept in $HOME/.oh-my-zsh/themes
. If you're really stuck, you could include the theme you're using in your question :)
The prompt expansion you're probably looking for is %n
, which expands to $USERNAME
.