[patch] record command history in loops

Laurence Darby ldarby at tuffmail.com
Sun Nov 11 16:23:12 EET 2007


Laurence Darby wrote:

> 
> Hello,
> 
> I made the foreach and other loop builtins record the commands in the
> history.
> 
> It's still not as good as bash's loop history, which recalls the entire
> loop as a single command, but the commands can always be manually merged
> into a single one separated by ';'s, so it's not too bad...
> 
> There's a couple of problems with my implementation.  There's probably
> a memory leak (see comment),  maybe the linked list needs to be built
> in the same way as in lex() so freelex() wont segfault?   Also
> getword() could be rewritten to be more general instead of mostly
> duplicated into histgetword().
> 

I've updated this: http://bugs.gw.com/view.php?id=48

Laurence



More information about the Tcsh-Bugs mailing list