[Feature Request] specify Semantic History action for different text patterns
I would very much like to have the ability to control the Semantic History action spawned by ⌘-Click on a 'URL' of a particular type.
Specifically, I would like to be able to specify different responses for different types of URLs or RegEx pattern matches (that is only calculated against the string that my mouse is hovering over).
For example, consider the following table:
URL Pattern | Action |
---|---|
(/[[:word:].-]*)+ |
Run Command: cd \5\1
|
[[:word:][:blank:]-]+.[[:alnum:]-]+ |
Open with default app... |
^https?.* |
Open URL... |
[+] Add New... |
Finally, as an additional aspect to this feature, I would absolutely LOVE(!!!) to be able to vary the piece of the URL path I am operating on by how far along the URL I hover my cursor. Selection patterns would ideally be adjustable by a RegEx table in the preferences, or else would be predefined based on the type of URL.
For example, consider the following variant selection levels of the same path:
- $> vim ~/Documents/temp/foo.doc
- $> vim
~
/Documents/foo.doc [with the mouse all the way on the left of the URL] - $> vim
~/Documents
/foo.doc [with the mouse over the second match-chunk of the URL] - $> vim
~/Documents/foo.doc
[with the mouse over the final match-chunk of the URL]
- $> vim
- $> curl https://www.google.com/search?q=test&source=lnms&tbm=isch
- $> curl https://www.
google.com
/search?q=test&source=lnms&tbm=isch [with the mouse over the domain name] - $> curl https://
www.google.com
/search?q=test&source=lnms&tbm=isch [with the mouse over the subdomain] - $> curl
https://www.google.com
/search?q=test&source=lnms&tbm=isch [with the mouse over the protocol] - $> curl
https://www.google.com/search?q=test
&source=lnms&tbm=isch [with the mouse over the first query item] - $> curl
https://www.google.com/search?q=test&source=lnms&tbm=isch
[with the mouse over the final query item]
- $> curl https://www.
P.S. While I recognize that this would be a difficult feature to implement, I would be happy to assist in whatever way might accelerate potential deployment of this feature. Perhaps I am overreaching, however I can't help but feel that this feature would be highly welcomed by the iTerm community. Or at least by me. I would use the heck out of it.