[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
another problem with bash PS1 handling
From: |
Nils |
Subject: |
another problem with bash PS1 handling |
Date: |
Sat, 17 Oct 2009 05:38:35 -0700 (PDT) |
User-agent: |
G2/1.0 |
PS1='$( [ "${LOGNAME}" != root ] && color=green )'
works in ksh93 and POSIX shell but fails in bash as bash seems to
expand the "!" to the next history file number before doing command
substitution. Setting PS1='$( [ "${LOGNAME}" !!= root ] &&
color=green )' preserves the "!" and works in bash but fails in ksh93
and POSIX shell.
- another problem with bash PS1 handling,
Nils <=