Last Updated: February 25, 2016
·
362
· unsignedzero

Expand * in bash

Ever wonder what you'll get when you use *?

ls * 

will display all file that match your glob. You can further filter this by piping the output into grep and then edit or what do what you want.

vim $(ls * | grep filter)

However, if you want to see what it expands out to, hit Alt + * on your keyboard.
This will cause bash to expand the output, showing you exactly what files are picked up. (Note: This will expand /.r and everything else from my bash experience.)

Under vi keybindings, the Alt + * does NOT work on zsh sadly.