Add stored search for matching email addresses#78
Add stored search for matching email addresses#78davidjb wants to merge 2 commits intotmux-plugins:masterfrom
Conversation
Email address validation is in line with HTML5 http://www.w3.org/TR/2012/CR-html5-20121217/forms.html#valid-e-mail-address. Due to quoting in tmux, emails with single-quote characters preceding the @ sign will not be completely selected. Activate the email address search with ``prefix C-e``.
|
Thanks for this. From what I see it was a lot of effort, but I think this won't get accepted soon. After merging last stored search a couple weeks back I realized we're just using the global key binding namespace with some searches that aren't used as often. They "sound" convenient, but are rarely if ever used. Also, the "cost" of adding a new stored search is just one line in You did do a very nice job with this PR, adding tests and all. Let's wait till tmux 2.1 comes out. It will have multiple key bindings feature so we'll be able to more liberally accept new stored searches. |
|
No problem. Take what you want or need from this PR as and when you'd At very least, there's about the best regex possible (with a detailed On 18 June 2015 at 20:37, Bruno Sutic notifications@github.com wrote:
|
|
Thanks! |
|
Hi, this is a cool idea, thank you! It happens that I have just made a PR (#91) that helps with global namespace pollution using a custom key table. For instance, I would map your email search as HTH |
Activate the email address search with
prefix C-e. A cursory search of the web shows this key combo doesn't appear common in tmux configurations or other add-ons.Email address validation is in line with HTML5 http://www.w3.org/TR/2012/CR-html5-20121217/forms.html#valid-e-mail-address, with one small exception of not matching single-quote characters before the @ sign (see background for more below).
The
display_textfunction in the tests had to change to quote the output being echoed to avoid being processed by the shell. As a result, one of the existing tests had to be adjusted so it continued working.This PR also adds debugging information to the tests readme.
Background on why single-quote character isn't matched: