Subject: Re: (a)sh command line editting and history patch.
To: None <tech-misc@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-misc
Date: 04/22/1999 10:44:44
In article <m10a7Je-000g5lC@most.weird.com> tech-misc@netbsd.org (NetBSD Miscellaneous Technical Discussion List) writes:

>While libedit is not really small, it's not all that big either, given
>the functionality it provides:
>
>text    data    bss     dec     hex
>61440   8192    0       69632   11000   obj.i386/libedit.so.1.0
>-rwxr-xr-x  1 root  wheel  70195 Jan 13 22:24 obj.i386/libedit.so.1.0

Well, some of libedit's bloat comes from the following features:

- screen update optimization code; tries to minimize characters sent to the
  terminal on a refresh
- dynamic stty handling
- dynamic key bindings
- string descriptions of all commands
- many more commands defined than the ones bound to keys
  [like emacs like incremental searches etc.]
- sh(1) tokenizer for parsing rc files

Yes, you can make it smaller, but then you lose those features.

Then you also might want to give away some functionality, in order to become
smaller:
    Does cutting and pasting multiline commands work on an xterm?
      [do you use the rightmost column properly?]
    Can you edit multiline commands?
    Do you handle resizing properly?

christos