On 12/21/14 17:42, enh wrote:
> On Sun, Dec 21, 2014 at 1:07 PM, James McMechan
> <[email protected]> wrote:
>> On 12/20/2014 05:55:45 PM, David Seikel wrote:
>>>
>>> On Sat, 20 Dec 2014 19:30:01 -0600 Rob Landley <[email protected]> wrote:
>>>
>>>>
>>>>
>>>> On 12/19/14 18:52, David Seikel wrote:
>>>>> On Fri, 19 Dec 2014 16:43:51 -0800 enh <[email protected]> wrote:
>>>>>
>>>>>> i was thinking about writing a trivial termcap implementation that
>>>>>> just returns the xterm-color answers and using the BSD less, but i
>>>>>> didn't realize that even the BSDs use the GNU less.
>>
>>
>> fortunately n-curses devolves tremendously when you don't try to support
>> every terminal type under the sun efficiently...
> 
> (very off-topic at this point, but vim doesn't use ncurses under any
> circumstances. moreover, it turns out that vim actually has all kinds
> of different fallbacks and as long as you don't misconfigure it like i
> did, it builds and runs fine out of the box on Android. it has a
> minimal tgetstr/tgoto/tputs implementation *and* a few built-in
> termcap subsets, including xterm. it's an 8.3MiB binary unstripped or
> 2.1MiB stripped for aarch64, though, so probably not of much interest
> to you guys :-) )

I plan to implement vi over the next year, but it's one of the four
realy big commands required by posix (sed, awk, sh, vi) and I've been
debugging sed against real-world data for _weeks_ now. (It's easy to
knock out a simple 90% implementation. It's really hard to make
something do everything right in all the cases people are going to throw
at it.)

There are some others (the kernel build requires bc now, if I'm doing
"less" and "vi" I should be able to do "screen", and "rsync" is really
useful...) but right now I'm focused on the list for 1.0, and there are
a lot of smaller commands (and the giant backlog of pending cleanups)
that could get knocked off the list faster...

By the way, the generic line editing infrastructure is useful not just
for shell command line editing, and obvious stuff like less, screen, and
vi, but even "watch" needs it to work quite right. (And if you're
supporting unicode, the difference between doing "more" and "less"
_right_ isn't as big as you'd think...)

If "less" is a priority, that actually helps prioritize the rest of
them. Once I've written the basic "navigate a line" infrastructure (with
querying screen size via ansi probe fallback, and reassembling escape
sequences that got decoupled going over serial line; I fixed both of
these in busybox several years ago), then stacking them isn't quite as
big a deal.

I do follow a security researcher on twitter (@0xabad1dea) and for a
while she had as her handle:

  echo -e "Melissa \xe2\x80\xae ασσιλέΜ \xe2\x80\xed"

So it would be nice to get the reversal codes to work. But given that
xfce's terminal doesn't handle it either...

(Dalias wrote a terminal that probably does. I should compile/install
that and try it out...)

Rob
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to