all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jonetsu <jonetsu@teksavvy.com>
To: help-gnu-emacs@gnu.org
Subject: Re: eshell TAB completion for executable files ?
Date: Thu, 20 Jun 2019 14:07:51 -0400	[thread overview]
Message-ID: <20190620140751.003ecdce@mistral> (raw)
In-Reply-To: <87wohgmh6f.fsf@telefonica.net>

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:


(defmacro with-face (str &rest properties)
  `(propertize ,str 'face (list ,@properties)))

(defun shk-eshell-prompt ()
  (let ((header-bg ""))
    (concat
     (with-face (concat (eshell/pwd) " ") :background header-bg)
     ;; (with-face (format-time-string "(%Y-%m-%d %H:%M)
" (current-time)) :background header-bg :foreground "#888")
     (with-face
      (or (ignore-errors (format "(%s)" (vc-responsible-backend
default-directory))) "")
      :background header-bg)
     (with-face "\n" :background header-bg)
     ;; (with-face user-login-name :foreground "white")
     ;; "@"
     ;; (with-face "localhost" :foreground "green")
     (if (= (user-uid) 0)
         (with-face " #" :foreground "red")
       "%")
     " ")))
(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.









  reply	other threads:[~2019-06-20 18:07 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 [this message]
2019-06-20 18:54     ` Óscar Fuentes

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

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

  git send-email \
    --in-reply-to=20190620140751.003ecdce@mistral \
    --to=jonetsu@teksavvy.com \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.