[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question: Is there any way to use the bash completion feature from E
Re: Question: Is there any way to use the bash completion feature from Emacs shell mode.
Sun, 9 Oct 2016 11:11:24 -0700
On Sat, Oct 8, 2016 at 12:14 PM, ISHIKAWA,chiaki <address@hidden> wrote:
> 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'm aware of eshell, which also seems to be improving, but i think
it's very difficult to have a bash-like shell that also does elisp ---
e.g., parentheses are special to both bash and elisp, but not in the
same way. So in eshell, for example, if i type '( ls )' (without
the quotes), it expects ls to refer to a function rather than a
command. That's very natural for what eshell does, of course, and
this is not a criticism of eshell!
But it's not the same as having a strong, deeply integrated, bash
mode, where emacs has access to the internals of the inferior process.
TIA for any info or pointers regarding this!
Re: Question: Is there any way to use the bash completion feature from Emacs shell mode., Bob Proulx, 2016/10/09
Re: Question: Is there any way to use the bash completion feature from Emacs shell mode., Oleksandr Gavenko, 2016/10/10