On Fri, 9 Mar 2007, Maxim Veksler wrote:
On 3/8/07, Peter <[EMAIL PROTECTED]> wrote:
You can overload PS1 with any code you want. It will run every time a
PS1 prompt is displayed.
Good tip, thank you.
The answer of curse is PROMPT_COMMAND.
http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x264.html
I actually meant what I said. PROMPT_COMMAND is also a possibility but:
[EMAIL PROTECTED]:~$ export PS1='$$:`date +%s` \$ '
8376:1173442662 $
also works. Here is something more useful:
export PS1='\u:[`jobs -p|wc -l`/`jobs -s|wc -l`] > '
you can use a conditional and terminal control codes to colorize the
nonzero stopped jobs for more effect (and ring a bell too since you're
at it).
Peter
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]