From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dan Hitt Newsgroups: gmane.emacs.help Subject: Re: Question: Is there any way to use the bash completion feature from Emacs shell mode. Date: Sun, 9 Oct 2016 11:11:24 -0700 Message-ID: References: <51ed4bfc-fbb1-9c29-afe9-fafabab3b7ce@yk.rim.or.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1476049777 24571 195.159.176.226 (9 Oct 2016 21:49:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Oct 2016 21:49:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "ISHIKAWA,chiaki" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 09 23:49:33 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btLyJ-0005QR-O5 for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Oct 2016 23:49:27 +0200 Original-Received: from localhost ([::1]:45678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btLyI-00032l-6K for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Oct 2016 17:49:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btIZK-0007es-MC for help-gnu-emacs@gnu.org; Sun, 09 Oct 2016 14:11:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btIZJ-00011H-Ck for help-gnu-emacs@gnu.org; Sun, 09 Oct 2016 14:11:26 -0400 Original-Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]:33598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btIZJ-00011D-7f for help-gnu-emacs@gnu.org; Sun, 09 Oct 2016 14:11:25 -0400 Original-Received: by mail-qt0-x229.google.com with SMTP id s49so40847399qta.0 for ; Sun, 09 Oct 2016 11:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5YzZsMNKneyb9cmkAPS/hysFVfPLl59RiKF1TOzxgGs=; b=WXpAknUXVfpj3I7rMc2iQQt1gs+FShczRPf1SGyGr2Qzqzx0KBQVL0URlGvz/LAMNp Fqu1R3Tr9Ao/tEQpZt+GFMy2HEfZbpnqqnuXebPbmj5IhVkfkwnQwVaYjymGB6lozWth zq0RtH9EBOuxWasRf33Vn+HCgqaOq5AHvzfMFo1vtcWaeoCNizDXSAAWp8crfMpRthA+ HFRVIu6UuJgoDXvh5lOx+8loI3Jf2OFxS1/OA2crXf8skAyxMRFWVxB4IyAehYxLspQS NkCUtP7NlDfvj0jRiwOnzJXm06ZD8BJfKdNUSQugQgyjWahFkELC6HRkdQkCUa4ngBFn wEcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5YzZsMNKneyb9cmkAPS/hysFVfPLl59RiKF1TOzxgGs=; b=iCySDMKG1ZeVXDpih9NGkjPCtwYSqUrQ5KjLSLCmg5Vs6xtkQlPws4VwZDhOhOL2TS Eoge6qwixAZvEjTUvwPXFAc/71ldWXY3w1P035Vn0+CIWkMVUwC2izJManJHLdZ8CSKx uHccgJr3asHcZ07zCej0umO97qOutKc4BsB/rLSqCy65LohIv77BlmMG1NwYkxTABOL8 iBPZO//N1X9kCcVBfeXBOKCs2ZRVrzOo5x5ixslgJ7/Itf9sSv9Pau38UhxmnkWVm9Y/ ixANJoHrbi78Rm2UYjMokogNgbLQdO4D0NvtPqIkPNIiGrex1PWHBhTrJ8MF9RUC/jG9 IgTw== X-Gm-Message-State: AA6/9RleZwek8KtZEzc455UkIQ2hPSibAsE+87nkvlkcGhDtKkQCdnlWJj6RtUQBokd7warLLZn3dXnk01Nxyw== X-Received: by 10.200.47.169 with SMTP id l38mr28257966qta.78.1476036684665; Sun, 09 Oct 2016 11:11:24 -0700 (PDT) Original-Received: by 10.140.29.135 with HTTP; Sun, 9 Oct 2016 11:11:24 -0700 (PDT) In-Reply-To: <51ed4bfc-fbb1-9c29-afe9-fafabab3b7ce@yk.rim.or.jp> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::229 X-Mailman-Approved-At: Sun, 09 Oct 2016 17:48:48 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111487 Archived-At: On Sat, Oct 8, 2016 at 12:14 PM, ISHIKAWA,chiaki 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'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! dan