all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kin Cho <kin@neoscale.com>
Subject: real shell completion in shell-mode
Date: 02 Oct 2002 09:41:06 -0700	[thread overview]
Message-ID: <7ielb8x07x.fsf@neoscale.com> (raw)

Hi,

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
useless.

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?

Thanks!

-kin

                 reply	other threads:[~2002-10-02 16:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ielb8x07x.fsf@neoscale.com \
    --to=kin@neoscale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.