[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51130: 29.0.50; shell completion fails to complete filenames
From: |
Lars Ingebrigtsen |
Subject: |
bug#51130: 29.0.50; shell completion fails to complete filenames |
Date: |
Mon, 12 Sep 2022 13:22:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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.
- bug#51130: 29.0.50; shell completion fails to complete filenames,
Lars Ingebrigtsen <=