all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Hitt <dan.hitt@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Question: Is there any way to use the bash completion feature from Emacs shell mode.
Date: Mon, 10 Oct 2016 07:05:21 -0700	[thread overview]
Message-ID: <CAOphizLGxuqYFs0dM-==PpFz96X20Zjk9F48tC2=VQP9q6_gWg@mail.gmail.com> (raw)
In-Reply-To: <8337k4g2ki.fsf@gnu.org>

Tab completion certainly works, but it's the emacs completion, not the
bash completion.

Unfortunately, i don't have a good example of the difference right
now, but i'll bet Chiaki does.

(Bash can be much more intelligent about how to complete than emacs,
of course, because it has a much sharper picture of what the user is
doing and how the user is configured, while all emacs can do is
observe from a distance.)

Now, Bob's suggestion to use term-mode may just work, not sure.

I never used term mode since trying it out a few decades ago, because
i would get stuck in a buffer and not be able to get out --- unless it
was a graphical emacs and i could use the mouse to choose another
buffer --- but that would defeat the whole power of parking the mouse
and controlling everything by the keyboard.

However, Bob said that you substitute Control X with Control C, and
man that works.

So you can switch buffers using, e.g., Control-C o.

I'd still be interested in a more deeply integrated bash, but if term
doesn't have other problems, it's a very good proxy.

dan

On Sun, Oct 9, 2016 at 11:06 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Dan Hitt <dan.hitt@gmail.com>
>> Date: Sun, 9 Oct 2016 11:11:24 -0700
>> Cc: help-gnu-emacs@gnu.org
>>
>> On Sat, Oct 8, 2016 at 12:14 PM, ISHIKAWA,chiaki <ishikawa@yk.rim.or.jp> wrote:
>> > Hi,
>> > I have been using GNU emacs more than 30 years and thank you for maintaining
>> > the great package.
>> >
>> > I have a question.
>> >
>> > Bash, the GNU shell interpreter has a feature called completion, and
>> > over the years, people have created various completion databases for many
>> > commands which are useful.
>> >
>> .......
>> > 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.
>>
>> This is also my experience (in almost every detail).
>>
>> As the OP says, emacs has improved over the decades, and all the time
>> new features are showing up, such as ibuffer.  And emacs can do a lot
>> of tricks, such as looking at jpg files.
>>
>> So, perhaps there is some mode like octave mode, that could run a bash
>> shell with much deeper integration (perhaps by keeping a second
>> interface to the inferior bash, such as through a socket or
>> something?)?  Or perhaps instead of bash it could be some derivative
>> of bash?  Or some derivative of zsh?
>
> I guess I don't understand what you guys are saying, because
> completion with TAB and M-? keys does work for me in shell-mode.  I
> see completion on commands, files, and environment variables.
>
> What am I missing?
>



  reply	other threads:[~2016-10-10 14:05 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 [this message]
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
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='CAOphizLGxuqYFs0dM-==PpFz96X20Zjk9F48tC2=VQP9q6_gWg@mail.gmail.com' \
    --to=dan.hitt@gmail.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.