> In bash-3.0 this was added: > > kk. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'. > > It seems that a large number of people preferred things the way they > were before, with \W giving the basename with no tilde abbreviation. > > Since there is no easy way of achieving this without resorting to > PROMPT_COMMAND, could there be a new escape sequence added for it?
Unless I'm reading this wrong, ${PWD##*/} does the job (though it fails if PWD == '/'). You can always use $(basename $PWD). It's the current behavior that's tough to do using shell expansions. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live...Laugh...Love Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://tiswww.tis.cwru.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash