Take the last part of the folder path in shell
Using basename $(pwd)
are two useless and expensive forks.
echo "${PWD##*/}"
should do the trick completely in the shell without expensive forks (snag: for the root directory this is the empty string).
You're right--it's a quick command:
basename "$PWD"