bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Expand first before asking the question "Display all xxx possibiliti


From: Davide Brini
Subject: Re: Expand first before asking the question "Display all xxx possibilities?"
Date: Thu, 6 Aug 2020 14:27:17 +0200

On Thu, 6 Aug 2020 15:13:30 +0300, Ilkka Virta <itvirta@iki.fi> wrote:

> I think they meant the case where all the files matching the given
> beginning have a longer prefix in common. The shell expands that prefix
> to the command line after asking to show all possibilities.
>
>   $ rm *
>   $ touch dan_home_bkp{1..199}
>   $ ls -l da[TAB]
>   Display all 199 possibilities? (y or n) [n]
>   $ ls -l dan_home_bkp[cursor here]
>
> So the shell has to fill in the common part anyway, and it might as well
> do it first, without asking.

Don't know about the OP's environment, but it works out of the box for me,
and it always has, as far as I can remember:

$ touch dan_home_bkp{1..199}
$ ls da[TAB]
$ ls dan_home_bkp[TAB][TAB]
Display all 199 possibilities? (y or n)

$ bash --version
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

--
D.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]