Allow to search selected text on Web
Submitted by Sindhu S
Link to original bug (#723088)
Description
Created attachment 267291 Add Search On Web
Patch to search selected text in g-t on the web. The search provider has been hardcoded to duckduckgo.com for now.
Because there was no direct function in VTE API that I could use to obtain selected text from the terminal, I had to trigger copy and then grab the text in the primary clipboard. I have a filed a bug about the lack of get_selection function in VTE [1].
I'd like to address an argument that's likely to come up against this patch: "it's not a good idea to pollute the context menu". This feature is as useful as the [select text, right click and search] we use in our web browsers. We can always open up a new tab and type in our search query but we can also search by selecting text and rightclicking. Same idea.
Please give your comments and should this be a feature developers wish to see in gnome-terminal, I will clean up and add feature to switch search providers in the code based on reviews.
[1] https://bugzilla.gnome.org/show_bug.cgi?id=723007
Patch 267291, "Add Search On Web":
0001-Add-Search-on-Web.patch
Version: git master