Put $PWD in there somewhere. I use
${PWD#${PWD%%*([!/])/*([!/])}} to display the last two directory levels, so my
prompt never gets TOO long.
The substring extraction of $PWD is ksh
specific. You could do it other ways, but this way it uses ksh builtins, so it
is _fast_
As an example, when I am in my $ORACLE_HOME, my
prompt ends up looking something like:
product/8.1.7 [09:54:42 AM] 181$
where 181 is the current command history
number.
|
Title: Unix question: how to display SID and path in prompt
- Unix question: how to display SID and path in prompt Daiminger, Helmut
- Re: Unix question: how to display SID and path in p... Steven Lembark
- RE: Unix question: how to display SID and path in p... Philip Douglass
- RE: Unix question: how to display SID and path in p... Curiel, David
- Re: Unix question: how to display SID and path in p... Steven Lembark
- RE: Unix question: how to display SID and path in p... Jared . Still
- RE: Unix question: how to display SID and path in p... Curiel, David
- RE: Unix question: how to display SID and path in p... Gogala, Mladen
- RE: Unix question: how to display SID and path in p... lembark
- RE: Unix question: how to display SID and path in p... Jared . Still
- RE: Unix question: how to display SID and path in p... Jared . Still
- RE: Unix question: how to display SID and path in p... John Kanagaraj
- RE: Unix question: how to display SID and path in p... Steven Lembark