[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pcomplete filename on unregistered commands
From: |
Carlos Pita |
Subject: |
pcomplete filename on unregistered commands |
Date: |
Sun, 10 Oct 2021 22:01:59 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) |
Hi all,
in shell-mode there are a number of c-a-p functions registered:
comint-c-a-p-replace-by-expanded-history
shell-environment-variable-completion
shell-command-completion
shell-c-a-p-replace-by-expanded-directory
pcomplete-completions-at-point
shell-filename-completion
comint-filename-completion
Most of the time it is pcomplete-completions-at-point the one which
returns the completion candidates, and this works great as long as the
there is a pcomplete/xxx function registered for the command xxx.
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! If I instead do:
cp ./<TAB>
I then get filename completions (although not from pcomplete).
I find this behavior very inconvenient since often commands take
filenames as arguments and I would prefer filename completion to be
triggered by default for commands not known by pcomplete.
So what can I do? Is there a way to tell pcomplete to return filename
candidates by default? Or perhaps filename completion functions to
return candidates even upon an empty prefix?
Thank you in advance,
Carlos
- pcomplete filename on unregistered commands,
Carlos Pita <=