NOTE: the potential downside to this approach is that git
is a requirement; however, this is simple to extend for other VCSes.
First, setup a git alias:
% git alias project-name '!git config project.info.name'
Use it like this (your CWD should be a git project):