From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Re: Question: Is there any way to use the bash completion feature from Emacs shell mode. Date: Mon, 10 Oct 2016 16:40:02 +0300 Organization: Oleksandr Gavenko , http://defun.work/ Message-ID: <87r37o5nm5.fsf@gavenkoa.example.com> References: <51ed4bfc-fbb1-9c29-afe9-fafabab3b7ce@yk.rim.or.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1476108831 12950 195.159.176.226 (10 Oct 2016 14:13:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Oct 2016 14:13:51 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 10 16:13:43 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 1btbKi-0001eg-Iu for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Oct 2016 16:13:36 +0200 Original-Received: from localhost ([::1]:50438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btbKh-0003BX-74 for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Oct 2016 10:13:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btaok-0001kT-Qn for help-gnu-emacs@gnu.org; Mon, 10 Oct 2016 09:40:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btaoh-0007mU-Ke for help-gnu-emacs@gnu.org; Mon, 10 Oct 2016 09:40:34 -0400 Original-Received: from [195.159.176.226] (port=56468 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btaoh-0007kP-DR for help-gnu-emacs@gnu.org; Mon, 10 Oct 2016 09:40:31 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1btaoI-0006Ci-MC for help-gnu-emacs@gnu.org; Mon, 10 Oct 2016 15:40:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:dSrU642h7Dt7TtA4VYxqvBaaWOE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-Mailman-Approved-At: Mon, 10 Oct 2016 10:09:51 -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:111493 Archived-At: On 2016-10-08, ISHIKAWA,chiaki wrote: > 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. Please look to my answer: http://stackoverflow.com/a/28618762/173149 In short you should learn ``M-x term`` mode and a few key binding: * ``C-C C-j`` * ``C-c C-k`` * ``C-c ...`` There is attempts to define ``comint-dynamic-complete-functions``: --8<---------------cut here---------------start------------->8--- (defun comint-completion-at-point () (run-hook-with-args-until-success 'comint-dynamic-complete-functions)) --8<---------------cut here---------------end--------------->8--- for readline-enabled programs: https://github.com/szermatt/emacs-bash-completion -- http://defun.work/