Learn how to customize the zsh prompt in Terminal to make it stand out regardless of your background.
The tilde (~) indicates the prompt’s location in the home directory.
You won’t find this dotfile by default on macOS, so you’ll have to make one.
Smartmockups
If it already exists, the command won’t do anything.
That’ll create a .zshrc profile in your user account’s home directory.
After that, the zsh profile will be available for non-login interactive shells every time you launch Terminal.
Here’s how to go about that.
However, if it didn’t exist when you ran thetouchcommand above, it’ll be blank.
Open a newTerminalwindow by hittingCmd + Tto confirm and view the changes you’ve just made.
If you wish to have a custom username, replace%nwith your preferred choice.
you’re free to include or remove information from the zsh prompt to suit your preference.
If this sounds too complex, use a site likeZsh Prompt Generatorto help you customize your Z shell.
Similarly, you might put%Sat the start and%sat the end to highlight the text.
The highlight will carry the same color you’ve chosen to appear between the%Sand%svariables.
you’re able to also underline the text of the zsh prompt.
Alternatively, it’s possible for you to safely delete thePROMPT/PS1andRPROMPTvariables in the .zshrc file.
Don’t worry, because the prefs in the .zshrc file only apply to the current user profile.
you’re able to bold, underline, shorten, and even include more information in it.