I would like to know if it is possible to change the PS1 according to the current path or pwd value?
For example:
cd /home/user/directory1
PS1=[\e[1;32m\u\e[m@\e[1;34m\h\e[m \e[1;33m\W\e[m]
But if i'm in an another directory :
cd /home/user/thisdirectory
PS1=[\w]
Thank you in advance!