+ 1
How do I make an environment variable refresh in bash profile?
When I try to configure the shell prompt as below, export PS1="${PWD}> " the path doesn't update after navigating to other directories. Why is that?
1 Antwort
+ 2
Because you basically set PS1 to a string value that doesn't get updated. However there are a lot of escape sequences that help you to customize your prompt:
https://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html
P.S. replacing ${PWD} with \w might be all you need to do.