Compute basename eagerly for Bash prompt
Compute basename eagerly for Bash prompt

Before:

  $ echo "$PS1"
  \[\033[01;34m\]$(basename '/home/greg/.local/share/virtualenvs/jupyter')\[\e[0m\] ...old PS1...

After:

  $ echo "$PS1"
  \[\033[01;34m\]jupyter\[\e[0m\] ...old PS1...

This is simpler, and moreover avoids the need to fork and exec
a `/usr/bin/basename` process each time the prompt is printed.
berdario/pew,berdario/pew