Closed louwers closed 8 years ago
This is an interesting point. However, if you just run ls | hs
without getting echo
involved, you'll see that heatseeker is already writing each selection on a separate line, so a useful delimiter is already present. You could add quotes with a loop, as in for i in $(ls | hs); echo -n \"$i\"\
.
Note that the final character after the escaped quote is intended to be an escaped space. Instead of looping, you could add quotes with something like sed
and then string everything together using paste
: ls | hs | sed 's/^\|$/"/g' | paste -sd' ' -
Very useful! Didn't know about the newlines. Thank you. :-)
Multiple selections are absolutely brilliant. I use it to quickly copy boilerplate code into the current directory, selecting only the files I need.
I know parsing the output of
ls
and friends is supposed to be evil, but for scripts for my own convenience I see no harm in it. However, it would be nice to be able to deal with output of multiple selections that have spaces in them. For example, this:Yields:
So there is no way to differentiate between those files. I believe the output should be:
or at least, there should be an option to enable enable single quotes around selections that contain spaces.
Thanks for considering :smile: