Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15339 > unrolled thread
| Started by | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| First post | 2019-09-01 13:42 -0400 |
| Last post | 2019-09-01 13:42 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Idea: *.p<TAB> completion Chet Ramey <chet.ramey@case.edu> - 2019-09-01 13:42 -0400
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Date | 2019-09-01 13:42 -0400 |
| Subject | Re: Idea: *.p<TAB> completion |
| Message-ID | <mailman.275.1567359783.2075.bug-bash@gnu.org> |
On 9/1/19 11:10 AM, 積丹尼 Dan Jacobson wrote:
> $ ls *.pdf
> a.pdf b.pdf
> $ diff *.p<TAB>
>
> At this point <TAB> should complete "*.pdf".
It does (well, the default completion does, maybe programmable completion
for diff does too). But the two possible completions differ immediately --
in the first character -- so what are you going to do? Rather than remove
the word, as normal completion would do, the default bash completion leaves
it alone.
> Or maybe as a bonus it could complete "a.pdf b.pdf" via a different key.
You want it to insert the possible completions? Use C-x* in emacs mode:
glob-expand-word (C-x *)
The word before point is treated as a pattern for pathname
expansion, and the list of matching filenames is inserted,
replacing the word. If a numeric argument is supplied, an
asterisk is appended before pathname expansion.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to top | Article view | gnu.bash.bug
csiph-web