Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16706

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

From Davide Brini <dave_br@gmx.com>
Newsgroups gnu.bash.bug
Subject Re: Expand first before asking the question "Display all xxx possibilities?"
Date 2020-08-06 14:27 +0200
Message-ID <mailman.984.1596716845.2739.bug-bash@gnu.org> (permalink)
References <871rkoslni.5.fsf@jidanni.org> <f507d245-af9c-3c41-9c19-acff9735e703@case.edu> <rgf0sa$c3f$1@ciao.gmane.io> <fa0e51f8-6ee3-c80e-d6d0-9be9561667e5@iki.fi> <1MiJZO-1kheAy3qvG-00fSO8@mail.gmx.com>

Show all headers | View raw


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.

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Expand first before asking the question "Display all xxx possibilities?" Davide Brini <dave_br@gmx.com> - 2020-08-06 14:27 +0200

csiph-web