-
-
Save vargeorge/8b20488b7d7b6c101b4b to your computer and use it in GitHub Desktop.
1. Edit ~/.bash_profile and add the following line to show full path before the $ prompt. | |
For example, as user@hostname:path/to/directory$ | |
# show path before the $ prompt | |
export PS1='\u@\H:\w$ ' | |
2. Save file and restart terminal or run source command | |
$ source ~/.bash_profile | |
On Big Sur it somehow prints the expression:
\u@\H:\w$
Never worked with zsh before. Does zsh use another config file than bash?
On Big Sur it somehow prints the expression:
\u@\H:\w$
Never worked with zsh before. Does zsh use another config file than bash?
I have the same issue
@mirisbowring @KienPM I have faced the same issue.
I helped to me to switch to bash from zsh in system settings: https://stackoverflow.com/a/59439507
Also try (additionally, it is optional) to prompt exec bash
and reload terminal.
@mirisbowring @KienPM I have faced the same issue.
I helped to me to switch to bash from zsh in system settings: https://stackoverflow.com/a/59439507
Also try (additionally, it is optional) to prompt
exec bash
and reload terminal.
Thanks for responding
On Big Sur it somehow prints the expression:
\u@\H:\w$
Never worked with zsh before. Does zsh use another config file than bash?
add PROMPT='%~ %n@%m:%# ' to ~/.zshrc
Explanation of what this is doing:
So if you just want to know where you are and see the prompt you can edit your bash profile to be just '\w$' or concatenate them like '\w$ '.