How can I create a bash and a zsh prompt that shows only the current directory and its parent directory?
For example, if I'm at the dir ~/pictures/photos/2021, it should show:
[photos/2021]$ echo hi
That's all. Would like it for bash and for zsh.
...). Also https://unix.stackexchange.com/questions/273529/shorten-path-in-zsh-prompt – Jeff Schaller May 24 '21 at 14:03