I run into this scenario a lot:
I'm in a big directory, and I am looking for a specific file that I forgot the exact name of, so I type
lsto see all files in there.
I see the file that I want
I need to pass this file to the command-line as an argument. The file name is complex.
What I currently do is just highlight the
ls output using the cursor/mouse, right click, and hit copy then paste it to my commandline prompt. I'd rather avoid this if there is a better way. I am aware of tab autocompletion, but sometimes its a situation where there are e.g. abcd abce abcf abcg abcz23 type of files, so the tab completion can be a bit unwieldy, unless you also have some advice there. Even if for example, I was able to copy the output of
ls to the clipboard, I would need some way to narrow it down to my desired file so as to not copy other filenames to the clipboard also.