if I am in: /1/2/3 I want prompt to show:user /3:If I am in : /  I want the prompt to show:user /:This does not work  ( when in /1/2/3 ) ( no slash )PS1=\u \W: This does not work ( when in / )  ( shows double / )PS1=\u /\W: What should I do ?
Always show slash before directory name in prompt
bash;prompt
You could always use:PS1='${USER=$(LOGNAME)} /${PWD##*/}: '(which would also work in most other Bourne-like shells).