On 5.8. 22:21, Chris Elvidge wrote:
On 05/08/2020 02:55 pm, Chet Ramey wrote:
On 8/2/20 6:55 PM, 積丹尼 Dan Jacobson wrote:
how about doing the expansion first, so entering
$ zz /jidanni_backups/da<TAB> would then change into
>> $ zz /jidanni_backups/dan_home_bkp with below it the question
>> Display all 113 possibilities? (y or n)
What happens if you have:
dan_home-bkp, dan_home_nobkp, dan-home-bkp, dan-nohome-bkp,
dan_nohome-bkp (etc.) in /jidanni_backups/?
Which do you choose for the first expansion?
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.
(Which just so happens to be what Zsh does...)
--
Ilkka Virta / itvi...@iki.fi