> Bash Version: 4.0 > Patch Level: 10 > Release Status: release > > Description: > This sequence of actions causes bash not to autocomplete when it should > ({key} means "type this key"; carriage return is explicit): > > --Session A-- --Session B, same directory-- > rm -f foo*{return} > cat foo{tab} > touch foobar{return} > {tab} > > At the first {tab}, bash finds that "foo" has no completion. At the > second {tab}, bash finds that it can now complete to "foobar". However, > it shows a list of possible completions with one choice instead of > completing to "foobar" right away. > > If the order of the touch and cat is reversed, bash immediately > autocompletes to "foobar" as expected.
This is how readline behaves: two completions in a row without one changing the contents of the readline editing buffer lists the possible completions. Readline doesn't check whether or not the file system has changed state; it just lists the possible completions. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/