[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenBSD csh-like prompt for bash and ksh



On Wed, Nov 20, 2002 at 11:51:43AM +0000, A. Farber wrote:

> to  create  a  prompt  for   bash  and  ksh  equivalent  to  the
> one   delivered   with  OpenBSD,   i.e.   short_hostname:cur_dir
> {hisotry_number}

Erm...why not just try it? A  quick copy-and-paste from your email
was all I needed to know that the ksh version works.

It's worth  noting that  the main  reason the  csh prompt  has the
history  number is  that  csh  lets you  repeat  command lines  by
referring to  that number. In ksh,  I doubt that number  will tell
you more than how many  times you've pressed <enter>. Instead, you
use arrow  keys or, as  I prefer, vi-style editing. Much  nicer to
hit <esc>/foo  than to try to  do mental gymnastics to  figure out
which line had foo on it.  (csh afficionados will probably want to
chime in  with how superior  it is to Bourne  derivitaves. To each
his own.)

The manual pages  for the shells will tell you  all this and more.
If  you haven't  read the  manual  page for  your favorite  shell,
you're missing out on a *lot* of good information. After all, it's
the one program you use more than any other.

A bit of Googling will get  you all sorts of interesting .profile,
.chsrc, etc. files. Mine can be found here:

    http://www.trumpetpower.com/pub/.profile

Cheers,

b&

--
Ben Goren
 mailto:ben_(_at_)_trumpetpower_(_dot_)_com
 http://www.trumpetpower.com/
 icbm:33o25'37"N_111o57'32"W

[demime 0.98d removed an attachment of type application/pgp-signature]



Visit your host, monkey.org