
Reverse Tab Completion - lucasgonze
Is it possible to get reverse tab completion, so that you type the last characters in the filename you want, press tab (or whatever the reverse keystroke is), and get the full file name?<p>Sometimes I have files where the unique bit is at the end, and tab completion is useless for them. For example with these ---<p>version1.txt
version2.txt
version3.txt<p>--- I&#x27;d have to type out &quot;version&quot; before hitting tab, and what I&#x27;d like is to type 1.txt, hit tab, and have &quot;version&quot; prepended.
======
ktpsns
Shells like bash do wildcard expansion on tab keystroke. So you type

    
    
       cat version*.txt
    

then tab and it expands that into

    
    
       cat version1.txt version2.txt version3.txt
    

The same is of course true with any other kind of wildcard like

    
    
       *.tar.gz
    

(is that what you mean with reverse tab completion?) And even ranges like
"version{1..3}" and much more. Look up [http://bash-hackers.org](http://bash-
hackers.org), the ultimate guide for shell globbing and other bash features.

