tmux-plugins / tmux-copycat

A plugin that enhances tmux search
MIT License
1.1k stars 63 forks source link

Support for filenames containing spaces? #112

Open joelostblom opened 7 years ago

joelostblom commented 7 years ago

I noticed that only the first word in a filename containing spaces is highlighted. If I understand correctly this is because the grep pattern that is used "(^|^\.|[[:space:]]|[[:space:]]\.|[[:space:]]\.\.|^\.\.)[[:alnum:]~_-]*/[][[:alnum:]_.#$%&+=/@-]*" does not contain an escaped whitespace and including one would lead to the inclusion of text following the filename as well?

I think that spaces in filenames is terrible practise but sometimes they end up on my system anyways (usually as downloaded pdfs). I wonder if there is an straightforward way to support filename with spaces without getting into problems with selected the following words in the line (I would probably vote for not supporting them to enforce good naming practises, but I am curious if there is a simple way to extract the file name even when it is containing spaces)?