Search code examples
macosshellzshmacos-sierra

zsh shell prompt showing unrecognised number


When I open a terminal window I now get this prompt in my zsh shell.

Last login: Wed Mar 11 15:35:53 on ttys000
You have new mail.
167~(:|✔) % 

I thought it may have been a user ID, however it is not listed here:

167~(:|✔) % id
uid=502(crmpicco) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae),702(com.apple.sharepoint.group.2)

This is my ~/.zshrc which has had no recent changes.

https://gist.github.com/crmpicco/6c05f4a051ac650909fe6b636fbc7324

Where is that random "167" coming from?


Solution

  • You have the following line in your .zshrc:

    PROMPT='%B%m%~%b$(git_super_status) %# '
    

    You can read the meaning of the escape variables in man zshmisc in the section "EXPANSION OF PROMPT SEQUENCES". %B changes to boldface mode, and %m outputs the hostname (up to the first .). So I believe the 167 is your hostname.