cooked mode sessions

Howard Chu hyc at symas.com
Thu Jun 17 19:08:14 EST 2010


Alon Bar-Lev wrote:
> libnoise is simple and  tiny...
> Although not all functionality is there... :)
>
> On Thu, Jun 17, 2010 at 11:10 AM, Peter Stuge<peter at stuge.se>  wrote:
>>
>> Howard Chu wrote:
>>> the client will use the readline library
>>
>> How about libedit? I guess readline is not so hot in OpenSSH
>> upstream.

Thanks for the suggestions, I hadn't seen these alternatives. I only started 
with readline since it's inside bash and I wanted to get bash to play along. 
linenoise looks promising since it's such a small library. Of course it also 
appears that it doesn't support any form of completion yet.

Command completion has turned out to be a bit tricky; I had first thought I 
could grab all of the completion possibilities out of band and feed them to 
the local readline library, but that's a waste. (After all, there are two 
goals here - one is moving more processing to the local client, but the other 
is to minimize network traffic.) Instead, I've opted to just forward any 
completion characters to the remote side, and let it deal with them if it can. 
This works, mostly, but it needs a bit more hacking to make sure it doesn't 
mess up and redraw the input line incorrectly.

There's another limitation that may be more annoying - you can't utilize any 
of the remote program's saved command history. Kind of raises a question about 
whether ssh itself should manage a persistent history, one for each 
hostname/destination.
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/


More information about the openssh-unix-dev mailing list