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.
Written by David Tran
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#