* C shell prompt (Re: Summary: Newbie Question: Prompt String for ksh)
@ 1998-04-07 11:06 Cai Xuejun
0 siblings, 0 replies; only message in thread
From: Cai Xuejun @ 1998-04-07 11:06 UTC (permalink / raw)
To: tru64-unix-managers
Gary George wrote:
> Thank you all who supplied the answer:
>
> Insert
> PS1='$PWD>'
> in your .profile file.
>
> DINMAN@aladdin-asi.com was the first to respond, followed
quickley by:
> Mukesh Soni, Eric Mermelstein, Larry Griffith, Graham McKenzie,
Charles
> Vachon, L. A. Mullikin, and Lucien Hercaud.
>
> H. Blakely Williford offered an enhanced alternative:
> PS1=`echo '\n$HOST \033[1m$PWD\033[0m\n> '`
> which retains the hostname in the string (a very good idea),
highlights
> the working directory in red, and starts a '>' prompt on a new line
> (another good idea, since paths in UNIX seem to grow quite long.)
>
> Scott L. McCracken offered a truely general approach, frontending
the
> 'cd' command with a function:
> CD() {
> cd "$1"
> PS1="`pwd`>"
> unalias cd
> alias cd=CD
> }
> CD $HOME
>
> Again, thank you all for your responses. My users were quite
pleased,
> too.
>
> Gary George, I.S.P.
>
> > -----Original Message-----
> > From: Gary George
> > Sent: Monday, April 06, 1998 9:04 AM
> > To: 'Alpha Managers'
> > Subject: Newbie Question: Prompt String for ksh
> >
> > Is there a way to make the Korn shell prompt show the current
working
> > directory, like the MS-DOS "PROMPT $P$G" ?
> >
> > Thanks.
> >
> > Gary George, I.S.P.
> >
Hi,
Is there a way to highlight or color the C shell prompt . I try this "
echo "\033[1m$HOME\033[0m" " in C shell and the display is "
\033[1m/home/caixj\033[0m " . While I use it in K shell the display is
"/home/caixj " which is highlighted . BTW, I use dtterm.
Thanks for any help.
Tsai Xuejun
--
mailto:caixj@hptc1.ihep.ac.cn
http://alpha01.ihep.ac.cn/~caixj
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-04-07 11:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-04-07 11:06 C shell prompt (Re: Summary: Newbie Question: Prompt String for ksh) Cai Xuejun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox