[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

real shell completion in shell-mode

From: Kin Cho
Subject: real shell completion in shell-mode
Date: 02 Oct 2002 09:41:06 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


comint-dynamic-complete works only in an inferior shell sharing
the same directory structure as emacs.

If in the inferior shell I telnet to another system, or open a
serial connection to an embedded device, neither of which share
the same directory structure, then comint-dynamic-complete is

Let's say the remote system is running bash, what I'd like to do
is to send a real tab to the remote bash and let it complete.
I've done that by binding tab to this function:

(defun my-shell-real-tab()
  (let ((comint-input-sender (function comint-send-string)))
    (insert (concat (list 9))) (comint-send-input)))

this kind of works for a single tab key:

[root@remote root]# cd /var/r<tab>
cd /var/run

The remote bash completes the input, but the old input is not
erased and the new input goes to the next line.  I don't see
terminal escape sequence send by the remote bash to fix up the
output.  TERM is set to vt100 in the remote bash.

At this point, pressing return does send the correct command to
the remote bash.  Obviously this still needs work because two
consecutive tabs doesn't work at all.

Anybody can offer some insight to help me fix this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]