[Aboriginal] Merry christmas, I have found two bugs
rob at landley.net
Thu Dec 27 04:06:53 PST 2012
On 12/27/2012 12:56:07 AM, David Seikel wrote:
> On Thu, 27 Dec 2012 00:37:46 -0600 Rob Landley <rob at landley.net>
> > Since ls isn't doiing any of that, probing would just be awkward so
> > toysh should set COLUMNS to a sane value. The problem is, we're not
> > using toysh yet because it's still just a stub...
> I got some or all of that terminal sizing stuff in my editor thingy
> already if I remember correctly. I remember you wanted me to cut it
> down into tiny bits to start with, so you don't have to digest the
> lump I sent.
Basically what I'd like is a self-contained line reader. More or less a
getline variant that can handle cursoring left and right to insert
stuff, handle backspace past a wordwrap (which on unix requires knowing
the screen width and your current cursor position), and one that lets
up/down escape sequences be hooked for less/more screen scrolling, vi
line movement, shell command history, and so on.
There's sort of three levels here, the first is "parse raw input,
assembling escape sequences into cursor-left and similar as necessary".
(That's the one I had to redo in busybox vi because they didn't do it
The second is "edit a line of text, handling cursoring _within_ the
line". That's the better/interactive getline().
The third is handling escapes from that line triggering behavior in the
larger command (cursor up and cursor down do different things in less,
in vi, and in shell command history).
The fiddly bit is that terminal_size() sort of has to integrate with
all of these. Possibly I need to have width and height be members of
struct toy_context. Or have the better_getline() take a pointer to a
state structure it can update, containing that info...
> Two problems - A) I wanted to get most of it working to
> sort out HOW I would get it all working, before cutting it down to
> small bite sized bits later. B) had no time to do anything with it
> since I posted the big blob, a new contract was keeping me busy.
I know the feeling. :)
> So the next step was to cut it down into something you could get your
> around easily, but that B) thingy stopped me from getting that done.
> While the new contract is taking a break for the Christmas / New Year
> holiday season (that's common here), the old contract decided this is
> the perfect time to keep me busy (that bastard). sigh
Eh, I've got my hands full right now anyway, juggling too many things
as usual. (I wrote a python program to send non-whitespace-damaged
email to linux-kernel so I could submit the perl removal patches
upstream, and I didn't do it quite right so I've got it mostly updated
to create proper message-ids and send later messages as replies to the
first one, and I've been studying how to get a patch series into
linux-next but I have to set up a git tree and dreamhost is being
stroppy but they just migrated landley.net to a new server yesterday
that might have a better time with it...)
And I start a new contract of my own on the 21st, so I've only got
another 3 weeks or so to bang away on open source stuff before my time
gets chomped again for 6 months or so. (Shouldn't be as bad as last
Mostly I've been relaxing during the holidays, though. Fade got a dog
from the shelter with _massive_ separation anxiety issues, my foot's
still not recovered from
https://twitter.com/landley/status/280546637565280256 (don't click on
that unless you want to see a picture of me bleeding), and so on.
Non-computer stuff takes time too, go figure. :)
More information about the Aboriginal