laktak / extrakto

extrakto for tmux - quickly select, copy/insert/complete text without a mouse
MIT License
878 stars 45 forks source link

Some words are not caught by ektrakto #33

Closed ghost closed 4 years ago

ghost commented 5 years ago

Hi,

I am new to using extrakto (which really seems like a great great tool btw). I have noticed that not all words come up in the fzf selection window. For example, with a simple ls or ls -1, some files/dirs of the listing do not show up in the fzf selection window, and since video is worth a million words, here is an asciicinema video for better visualization: https://asciinema.org/a/yxkPmJSyShMe4g2XOIypywKWC (please not this should only be available for 7 days). In the video, the file "rofi" and directory "work" are not shown (actually I could have written those words to be sure, but I can assure you, it's not there).

ghost commented 5 years ago

Ok, so this seems to be due to this line:

54 parser.add_argument('-m', '--min-length', default=5,

So Idk what a minimum length of 5 was chosen, maybe for performance reason or maybe convenience, but setting it to 1 doesn't seem to cause any problem at all, and it will correctly catch any kind of word afterwards, so it's cool.

laktak commented 5 years ago

Thanks, glad you like it.

The assumption was that for short words it would be faster to type them than to invoke extrakto. They are filtered out to make it easier to find a match.

ghost commented 5 years ago

I like it a lot actually. What would make it even better would be to have a way to define filters as plugin options (tmux @options?) to eventually be able to cycle through anything the user wants (more than just words/lines/urls, like hex-strings, hashes, command line (maybe we can identify it by the prompt symbol til end-of-line), maybe command output even; I mean, any arbitrary pattern the user might set, sort of like tmux-fingers)

laktak commented 4 years ago

Hmmm, I think extrakto should be used for capturing the simple selections you do frequently. For anything else there is still the tmux selection. If you want to discuss this further please open another issue.

mustaqimM commented 1 year ago

minimum length of 5

@laktak I realise this is an old issue, but please consider adding that to the readme file. I spent a while trying to figure out why my regex to match commands in the buffer starting with $ isn't working; it was because it was too short 🤦‍♂️. And thanks for the project!

laktak commented 1 year ago

Well, the README actually links to HELP.md (also shown with control+h):

  • word, the default filter allows you to select words (min length=5)