feature request: single line mode.
Bob Proulx
bob at proulx.com
Sun Nov 30 15:31:11 EST 2008
Daniel Kahn Gillmor wrote:
> Han Boetes wrote:
> > On slow connections making typos is very annoying because of low
> > latency. Could you add a feature which only sends complete lines,
> > like with an IRC client where nothing get's sent until you hit
> > return?
The very first solution that I thought of when I read the question was
to use emacs. There are various subprocess modes available such as
shell mode, ssh mode, terminal mode, that all run locally until the
full line is available and then sending the result to the subprocess.
But I don't expect this to be of comfort to you because if you were an
emacs person you would have already thought of it and if not then this
probably isn't going to turn you into one. :-)
> You might be able to do this with something like rlwrap:
> http://utopia.knoware.nl/~hlub/uck/rlwrap/man.html
> I haven't tried it though.
I thought that was an excellent suggestion and decided to actually try
it myself. This worked pretty well for me.
rlwrap -a ssh -t hostname.example.com sh -i
Do not expect programs such as screen editors (e.g. vi or emacs) to
function normally. The local rlwrap process won't know to switch from
canonical mode to raw mode and will buffer input to the remote
commands until the newline. You may need to type blind and then add
an extra enter to push the input through.
But of course this was the environment in which the classic ed was
developed and ed works very nicely. :-) If you are not going to use
ed or screen editor then it would be better to not use the ssh -t
option and not use a tty on the remote end. Without a tty programs
will typically buffer all of their output until they exit.
rlwrap -a ssh hostname.example.com sh -i
Fun!
Bob
More information about the openssh-unix-dev
mailing list