Hacker News new | ask | show | jobs
by josteink 4018 days ago
The bangs work any place in the string. They don't have to be a prefix.

In Firefox you have a dedicated search bar (ctrl-k) which remembers your search across locations. So you search for "heisenbug oracle ipv6" press enter and are not immediately happy about the precision of your search.

So you press ctrl-k again and append "!so". Bang, your previous search is now applied to stack overflow and you have your answer straight at spot 1.

It's a very good flow. It will never work in retarded browsers who insist on removing the search bar though (like Chrome, Safari, IE).

In a deeply misguided act of Chromeism, Firefox was considering going in that direction too, but the outrage in the userbase hopefully caused them to never venture that line of thought again.

3 comments

It works the same way in the safari bar. If you use it to search, the search bar maintains your search string, not the URL. So you can use ⌘L on the search page, and your URL bar will be focused with the plain text of what you just searched, and you can append !g as yon would expect.

And copying the search text in the URL bar actually copies the link too, which is nice.

>It will never work in retarded browsers who insist on removing the search bar though (like Chrome, Safari, IE).

Uh huh. Because they'll lose their ability to tell if something is a search or a URL because of bang parsing, right?

But the URL changes from a search string to the URL of the results. A dedicated search bar retains what you last searched for. For example mine has "league of legends !w" at the moment. If I wanted to search on Startpage for that I just hit ctrl-k and change !w to !sp.
I suppose it saves typing, but I don't really mind doing site:news.ycombinator.com on Google.