all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bob Proulx <bob@proulx.com>
To: "ISHIKAWA,chiaki" <ishikawa@yk.rim.or.jp>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Question: Is there any way to use the bash completion feature from Emacs shell mode.
Date: Sun, 9 Oct 2016 18:49:47 -0600	[thread overview]
Message-ID: <20161009184049476560792@bob.proulx.com> (raw)
In-Reply-To: <51ed4bfc-fbb1-9c29-afe9-fafabab3b7ce@yk.rim.or.jp>

ISHIKAWA,chiaki wrote:
> However, due to various reasons, I prefer to run bash inside Emacs's shell
> buffer. It is easy to copy&paste the result of bash output and reuse
> commands is one reason. (I am so used to keyboard and copy&paste using mouse
> or other pointing device takes much longer.)
> 
> Unfortunately, bash's completion feature does not work in Emacs shell mode.
> Obviously, [TAB] is stolen by Emacs for its own handling of TAB character.
> Emacs's tab completion for filenames works great.
> But I would like Bash's completion somehow works, too.
> 
> Is there a way?
> Am I missing the obvious?
> (Does using eshell mode helps?)

You mention emacs shell mode.  But if you want bash to handle the
completion then I think maybe you want emacs term mode with bash.
Using term mode is different from using shell mode.  But you get
exactly the bash features you wish.

  M-x term

Note that most C-x keys are remapped to C-c inside that buffer.

  https://www.gnu.org/software/emacs/manual/html_node/emacs/Terminal-emulator.html#Terminal-emulator

Keys are mapped:

  https://www.gnu.org/software/emacs/manual/html_node/emacs/Term-Mode.html#Term-Mode

The buffer is allocated a separate tty.  The result is that most keys
are passed through directly to bash and therefore all bash completion
works from bash without emacs in between.

Bob



  parent reply	other threads:[~2016-10-10  0:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-08 19:14 Question: Is there any way to use the bash completion feature from Emacs shell mode ISHIKAWA,chiaki
2016-10-09 18:11 ` Dan Hitt
2016-10-10  6:06   ` Eli Zaretskii
2016-10-10 14:05     ` Dan Hitt
2016-10-10 14:13       ` Dan Hitt
2016-10-11  1:02         ` Bob Proulx
2016-10-11  0:59       ` Bob Proulx
2016-10-11 12:12         ` Filipp Gunbin
2016-10-10  0:49 ` Bob Proulx [this message]
2016-10-10 13:40 ` Oleksandr Gavenko
2016-10-10 23:24   ` Dmitry Gutov
2016-10-12  0:25   ` ISHIKAWA,chiaki
2016-10-12 18:50     ` Oleksandr Gavenko
2016-10-19  1:12     ` Robert Thorpe

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=20161009184049476560792@bob.proulx.com \
    --to=bob@proulx.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ishikawa@yk.rim.or.jp \
    /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.