Reputation: 11
I'm using Mac OS Catalina.
I tried editting .zshrc file with
export PS1="\u \w \$ "
and my expected output would be user desktop $
.
However the actual output was \u \w $
. I don't understand why \u
or \w
is not working.
.zshrc file is located in /Users/(username) and I editted the file with VS code.
I checked that SHELL=/bin/zsh
.
I literally have no idea why this is not working. Any help would be great!
Upvotes: 0
Views: 950
Reputation: 11
Include that's line in file ~.zshrc :
export PS1="%10F%n%f:%11F%1~%f \$ "
for other options see this site : http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html
Upvotes: 1
Reputation: 11
Literally I spent hours before posting this question, but right after I posted, I found a solution.
zsh seems to use different expansion, darn! http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html
Upvotes: 0