A Bang I added for scoop.sh to the official Bang repository exhibits unusual behavior when used without a search term. Unlike other Bangs, it appends the search variable {{{s}}}
into the URL and adds an unnecessary question mark before the hashtag.
A while ago I added a Bang for scoop.sh to the official Bang repository:
{
"s": "Scoop",
"d": "scoop.sh",
"t": "scoop",
"u": "https://scoop.sh/#/apps?q={{{s}}}",
"c": "Tech",
"sc": "Downloads (software)"
},
Actual Behaviour
Searching without a term:
- Query:
!scoop
- Actual redirect:
https://scoop.sh/?#/apps?q={{{s}}}
- The string
{{{s}}}
remains in the URL, and an extra question mark is added before the hashtag, which differs from the behavior of other Bangs.
Other Bangs (e.g., !github
, !youtube
) simply redirect to their base domain when no search term is provided.
Expected Behaviour
Searching with a term:
- Query:
!scoop test
- Expected redirect:
https://scoop.sh/#/apps?q=test
(works as expected)
Searching without a term:
- Query:
!scoop
- Expected redirect:
https://scoop.sh/
(base domain, without search terms).