GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)
OS: Gentoo Linux
Originally met this while the download of iso file in firefox was
nearing completion, and I was preparing myself to move the
downloaded foobar.iso file elsewhere. I opened terminal with bash,
typed "mv foobar." in the Downloads dir and pressed . Two options
appeared: foobar.iso and and foobar.[somecode].iso.part. I kept pressing
, but after the download finished, with repeated presses bash kept
displaying "foobar.iso" as a single option of completion and did not
complete to the already singular name.
Steps to reproduce:
1) in one instance of bash, run
touch foobar.a; touch foobar.b; sleep 10; rm foobar.b
2) run second instance concurrently, type "ls foobar.",
press twice to get the two options existing at that moment
("foobar.a" and "foobar.b")
3) keep pressing repeatedly
4) as the 10 seconds pass and the situation becomes clear and
complete-able, "foobar.a" is never completed to with repeated
presses of , it is (strangely) only displayed as a single
option for completion.
The result on screen around the 10th second looks as follows:
# ls foobar.
foobar.a foobar.b
# ls foobar.
foobar.a foobar.b
# ls foobar.
foobar.a
# ls foobar.
foobar.a
# ls foobar.
foobar.a
Expected behaviour:
Bash should complete to "foobar.a" as soon as it is an unique option,
i.e. as soon as foobar.b is removed after 10 seconds. Offering a
singular option for completion does not make sense anyway.
Additional note:
Also, when, in the erroneous situation after the 10 seconds elapsed, the
"." at the end of filename is deleted and written again (visually the
same situation) and then is pressed, the completion succeeds.