I've written a command that ssh-es to a remote host and runs an interactive command there. Something like:
(defun remote-command ()
(interactive)
(pop-to-buffer (get-buffer-create "*remote-command*"))
(async-shell-command "ssh remote-host interactive-command" (current-buffer)))
A longstanding annoyance has been that when I enter a very long line, some portion of the end of the line is echoed back before the command line is executed by interactive-command
. The main notable consequence, aside from screen clutter, is that if the end of the line contains an odd number of quotation marks, electric-pair-mode
gets confused and no longer inserts matching pairs when I type a quote.
When I try running this ssh command from an OS X Terminal, I see similar behavior, except that the echoed portion is everything but the first physical line that the terminal presents. I discovered by accident that if I give ssh the -t
option in Terminal, the echoing stops completely. I tried adding that option to my Emacs command, but it makes no difference.
That's that I've tried that have made no difference:
stty -echo
before runninginteractive-command
- Setting the
TERM
environment variable to various settings before runninginteractive-command
, eg:vt100
,dumb
- Setting
comint-process-echoes
tot
If it makes a difference, interactive-command
is actually spark-shell
.
Help?