PS1='${PWD}' and make uppercase?
Warren D. Swan
woods at cbnewsc.ATT.COM
Sun Jan 7 11:08:32 AEST 1990
In article <8229 at ingr.com> uunet!ingr!b23b!dragon!keith (Keith Ford) writes:
>
>I noticed in a recent discussion that using PS1='${PWD}' will cause the
>working directory path to become the UNIX prompt. This works fine, but
>is there a way to translate it to upper-case?
typeset -u PS1
causes your entire PS1 prompt to always be upper case. Which is good for
the situation you've just asked about, but not so good if you want to
include something else in your PS1 that you don't want to be upper case,
such as PS1="`logname` "'$PWD'.
DON'T DO: typeset -u PWD
since there are some programs that assume that PWD is the valid name of
the current working directory, which it wouldn't then be.
More information about the Comp.unix.questions
mailing list