Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
516 views
in Technique[技术] by (71.8m points)

prompt - ZSH: Hide computer name in terminal

How would I hide the computer name in the prompt while using the terminal?

At the moment it shows both username and computer name like so:

iTerm screenshot of user prompt

It would save some space by removing anwarchoukah@anwars-mbp, seeing as I actually know who I am:)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

try to add export DEFAULT_USER="$(whoami)" to your .zshrc file


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...