shell editing (was: Re: Thank you, Bill Joy!)

Donn Baumgartner donn at r2d2.ACA.MCC.COM
Sat Sep 3 05:15:59 AEST 1988


In article <43 at unet.unet.pacbell.COM> rodc at unet.PacBell.COM (Rod Creason) writes:
>In article <2662 at uvacs.CS.VIRGINIA.EDU> rwl at uvacs.CS.VIRGINIA.EDU (Ray Lubinsky) writes:
>>Using vi-style command line editing I can modify previous commands like you've
>>shown in at least the amount of time you can do it with csh's !$ construct AND
>>I get the visual reassurance of seeing what the newly-edited command is really
>>going to be.
>>
>>Csh history editing mechanism is a pitiful kludge compared to actually EDITING
>>your past commands.  (I cut my teeth on csh so its not that I haven't seen
>>both sides of the UNIX shell fence.)  Hunt-and-peck typists need not apply.
>
>I agree completely.  I used csh for many years until I was without and
>had to use ksh.  Now that I have used the korn shell I will only use csh
>when I must (at work we do not have ksh).  The editing capabilities are
>wonderful (it even supports 'undo').

Frankly, I agree with the long-standing (but often forgotten) unix idea
that you should build small 'pieces' to do specific tasks, and them put
them together in the unix fashion...

There is a library package called 'led' (led(3)), which can be linked against
any application that does input (eventually) through read(2) (probably most
interactive applications, at least, and certainly 'csh'), which will provide
'emacs-style' command line editing and history.  I highly recommend the
package, although I am somewhat partisan (credits included below).  Since
this can be used with *any* interactive application, and is not proprietary,
I would be happy to send it to at least a few curious people.  I use it with
'csh', and have used it with 'sh', as well; disclaimer... I've never bothered
porting it outside of BSD, although once I started to...

It you don't have source to your shell, life is tough.  For Sun users, I have
(and can send uuencoded) versions of csh compiled for Suns 2 & 3 (I think I
can do that legally, but someone will no doubt correct me if I'm wrong).

extract from LED(3) man page:
 .SH AUTHORS
 .nf
 James Wyllie    original author of line editing for Cornell shell.

 Dean Krafft     modified line editing package at Cornell.

 Robert Hood     modified line editing package for terminal independence
                and made it a front-end for read(2) (at Rice University).

 Donn Baumgartner
 Tony Rossini    modified termcap usage & profiling hierarchy, added the
                 on-line keymap, and the help capabilities (Rice U.).
 .fi
						- Donn Baumgartner
        _
       ( )
    \___|___/     Fear no Evil!
        |
        |         Just wanna Skate...
       / \
    __/   \__     Skate (Free) or Die!
    oo     oo



More information about the Comp.unix.wizards mailing list