unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: help-gnu-emacs@gnu.org
Subject: Re: eshell TAB completion for executable files ?
Date: Thu, 20 Jun 2019 20:54:41 +0200	[thread overview]
Message-ID: <87k1dgm6j2.fsf@telefonica.net> (raw)
In-Reply-To: 20190620140751.003ecdce@mistral

jonetsu <jonetsu@teksavvy.com> writes:

> On Thu, 20 Jun 2019 17:04:40 +0200
> Óscar Fuentes <ofv@wanadoo.es> 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.




      reply	other threads:[~2019-06-20 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 14:08 eshell TAB completion for executable files ? jonetsu
2019-06-20 15:04 ` Óscar Fuentes
2019-06-20 18:07   ` jonetsu
2019-06-20 18:54     ` Óscar Fuentes [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1dgm6j2.fsf@telefonica.net \
    --to=ofv@wanadoo.es \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).