ESC-g for glob expansion in bash

Tue, 2009-01-06

Just like <TAB> expands a filename given a prefix you can also expand a file name given the middle part of a file name.

Example:

$ ls
abc1def  abc2def  abc3def  abc4def  abc5def
$ ls *2*<ESC>g

Which will expand to:

$ ls abc2def

via a stackoverflow question

Advertisements