Re: [ILUG] Bash Function

From: Ross Davis (ross at domain skynet.ie)
Date: Fri 01 Jun 2001 - 02:24:13 IST


> > PROMPT_COMMAND="echo -e \"\033[0;32m[\$(date +%a\ %b\
> > %e)](\$NEWDIRSIZE)[\$(jobs | wc -l | awk '{print \$1}')]\033[0m\""
> >
> Right. 2 things:
>
> 1. Instead of putting "[\$(jobs | wc -l | awk '{print \$1}')",
> you could put \j in your $PS1 prompt. From the bash manpage:
>
> \j the number of jobs currently managed by the shell

This is an option for the PS? vars. The PROMPT_COMMAND var takes a
command. I don't know any way of using any escape characters apart from
the ones echo understands!?

Ross



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:10:32 GMT