On Wed, Feb 23, 2005 at 02:15:12PM -0500, Chet Ramey wrote: > Unless I'm reading this wrong, ${PWD##*/} does the job (though it fails > if PWD == '/'). You can always use $(basename $PWD).
Oh -- silly of me. I'd forgotten that PS1 gets expanded. ${PWD##/*/} does what I want, except for the corner-case of '//'. Thanks, Tim. */
pgpulqY0nN6bm.pgp
Description: PGP signature
_______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash