Johannes Hofmann <Johannes.Hofmann at gmx.de> wrote:
Hi,
On Mon, Jun 17, 2013 at 03:16:09PM +0300, Aki Helin wrote:
Hi,
[...] Searches would have to be differentiated somehow from URLs. Dillo already has a customizable list of engines in preferences, so one natural solution would be to interpret url strings which start with the name of a search engine as searches to be performed using it, so that e.g. 'wikipedia slartibartfast', 'google foo' and 'weather oulu' do what you would expect.
Below is a quick patch I've used to do this for a while, should anyone else find this feature useful.
This has been discussed before, but somehow wasn't completed. I like your idea to reuse the search engine name to derive the shortcut. However, I would allow arbitrary prefixes of the search engine name as in the slightly modified patch below. What do you think?
Looks good to me. You could even drop the 'len > 0' check, so that prefixing with space leads to search with your first search engine, and an optional prefix can be given to choose another one. -- Aki Helin