From: Lars Ingebrigtsen <larsi@gnus.org>
To: Carlos Pita <carlosjosepita2@gmail.com>
Cc: 51130@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#51130: 29.0.50; shell completion fails to complete filenames
Date: Mon, 12 Sep 2022 13:22:33 +0200 [thread overview]
Message-ID: <87a67496rq.fsf@gnus.org> (raw)
In-Reply-To: <m2r1cs6yxo.fsf@gmail.com> (Carlos Pita's message of "Mon, 11 Oct 2021 00:08:19 -0300")
Carlos Pita <carlosjosepita2@gmail.com> writes:
> Now, many usual commands like cp don't have a pcomplete handler so they
> behave very poorly regarding completion, take for example:
>
> cp <TAB>
>
> this doesn't give me any completion candidate!
[...]
> In shell.el we have:
>
> ;; Don't use pcomplete's defaulting mechanism, rely on
> ;; shell-dynamic-complete-functions instead.
> (setq-local pcomplete-default-completion-function #'ignore)
>
> So pcomplete is falling back to the ignore (no-op) function. If you
> kill the local binding in the shell buffer, then the default of the
> default does complete paths.
This was possibly added by:
commit e17d9003618cef75852a0b88334cea66a5c4b016
Author: Stefan Monnier <monnier@iro.umontreal.ca>
AuthorDate: Sat Jun 4 09:31:34 2011 -0300
* lisp/shell.el: Require and use pcomplete.
(shell-dynamic-complete-functions): Add pcomplete-completions-at-point.
(shell-completion-vars): Set pcomplete-default-completion-function.
Just leaving pcomplete-default-completion-function alone seems to give
better results in shell-mode (after testing very briefly), so I'm not
sure why that was added.
Perhaps Stefan has some comments; added to the CCs.
next prev parent reply other threads:[~2022-09-12 11:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 3:08 bug#51130: 29.0.50; shell completion fails to complete filenames Carlos Pita
2022-09-12 11:22 ` Lars Ingebrigtsen [this message]
2022-09-12 14:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-13 11:19 ` Lars Ingebrigtsen
2022-09-13 13:32 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-14 12:28 ` Lars Ingebrigtsen
2022-09-14 14:27 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-14 15:20 ` Lars Ingebrigtsen
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=87a67496rq.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=51130@debbugs.gnu.org \
--cc=carlosjosepita2@gmail.com \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).