I remember reading a trick in a stackoverflow comment somewhere for getting a list of filenames in the terminal, but I can't exactly remember it.
If you have a bunch of files like:
foo-a.txt
foo-b.txt
foo-c.txt
There is a trick that goes something along the lines of:
- type
cat foo-*
- Press something like
tab
,backspace
,esc
(this does not work, but is the step I want to know) - The command line should now have
cat foo-a foo-b foo-c
Note that is is different to the basic tab completion which shows a list of filenames below the command. This will put all the filenames in the command input so that pressing "enter" will execute cat with all the files.
Can anyone enlighten me?