[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash does not autocomplete after file creates
From: |
Chet Ramey |
Subject: |
Re: Bash does not autocomplete after file creates |
Date: |
Thu, 26 Mar 2009 21:28:30 -0400 |
User-agent: |
Thunderbird 2.0.0.21 (Macintosh/20090302) |
> 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 chet@case.edu http://cnswww.cns.cwru.edu/~chet/