Skip to content

Conversation

@faizk
Copy link

@faizk faizk commented Aug 29, 2016

The following should result in the same search url, but they don't:

open DEFAULTENGINE needle
open? needle
open needle

If DEFAULTENGINE is configured as

let searchengine myengine = "http://my.engi.ne/search?q=%s"
let defaultengine = "myengine"

Then the 3 open commands result in:

http://my.engi.ne/search?q=needle # OK
http://my.engi.ne/search?q=%sneedle # ?
http://my.engi.ne/search?q=%sneedle # ?

This fix makes the behavior consistent regardless of whether or not the
search engine to use is explicit; from README.md -

If you leave out the '%s' at the end of the URL,
your query will be appended to the link.
Otherwise, your query will replace the '%s'.

The following should result in the same search url, but they don't:

open DEFAULTENGINE needle
open? needle
open needle

If DEFAULTENGINE is configured as

let searchengine myengine = "http://my.engi.ne/search?q=%s"
let defaultengine = "myengine"

Then the 3 open commands result in:

http://my.engi.ne/search?q=needle  # OK
http://my.engi.ne/search?q=%sneedle  # ?
http://my.engi.ne/search?q=%sneedle  # ?

This fix makes the behavior consistent regardless of whether or not the
search engine to use is explicit; from README.md -

> If you leave out the '%s' at the end of the URL,
> your query will be appended to the link.
> Otherwise, your query will replace the '%s'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant