From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: eshell TAB completion for executable files ? Date: Thu, 20 Jun 2019 20:54:41 +0200 Message-ID: <87k1dgm6j2.fsf@telefonica.net> References: <20190620100804.79f65cba@mistral> <87wohgmh6f.fsf@telefonica.net> <20190620140751.003ecdce@mistral> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="1181"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 20 21:35:34 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1he2qM-00009u-3o for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jun 2019 21:35:34 +0200 Original-Received: from localhost ([::1]:52450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1he2qL-0005HA-2k for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jun 2019 15:35:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51594) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1he2D0-00082T-08 for help-gnu-emacs@gnu.org; Thu, 20 Jun 2019 14:54:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1he2Cx-0006KD-So for help-gnu-emacs@gnu.org; Thu, 20 Jun 2019 14:54:52 -0400 Original-Received: from [195.159.176.226] (port=46058 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1he2Cx-0006Jk-My for help-gnu-emacs@gnu.org; Thu, 20 Jun 2019 14:54:51 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1he2Ct-000LE7-1C for help-gnu-emacs@gnu.org; Thu, 20 Jun 2019 20:54:47 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:ooahKCmb+aE3WAl/2lFQbivYFwQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:120993 Archived-At: jonetsu writes: > On Thu, 20 Jun 2019 17:04:40 +0200 > Óscar Fuentes wrote: > >> It should. Please describe how to reproduce the problem starting with >> >> emacs -Q >> >> Which OS are you using? > > Linux. Although with 'emacs -Q' it works fine. So there must be > something somewhere in the .emacs file that's altering this behaviour. > > I've added yesterday a snippet in order to have a better prompt in > eshell. By better I mean that when it's located in a folder whose > path is quite long, I'd like to have the cursor right at the first > column and not way down to the right, sometimes unseen. > > So took the following from the emacs wiki: > [...] > (setq eshell-prompt-function 'shk-eshell-prompt) > (setq eshell-highlight-prompt nil) > > > Of which I commented out some things I did not want and also redefined > header-bg from a white colour to nothing. > > Commenting out that snippet and retesting, the behaviour becomes as > expected. So there's something in that snippet that "kills" the > completion feature regarding executable files. It will complete with C > source file of the same name, but not with the executable. I'm > certainly no expert, far from it, in lisp and emacs so I can't see what > that could be. You are changing eshell-prompt-function, which documentation reads: A function that returns the Eshell prompt string. Make sure to update ‘eshell-prompt-regexp’ so that it will match your prompt. And eshell-prompt-regexp: A regexp which fully matches your eshell prompt. This setting is important, since it affects how eshell will interpret the lines that are passed to it. If this variable is changed, all Eshell buffers must be exited and re-entered for it to take effect. So TAB completion for executables is failing because eshell no longer can distinguish the prompt from the rest of the text. It acts as if you already introduced the executable, so it only accepts completion for commandline parameters suchs as filenames.