Hacker News new | past | comments | ask | show | jobs | submit login

It would be nice if the author could fix this page, since the examples are incorrect and do not work as written. You need a space after the magic character.

Although I use it exactly as described (prefixing my search with the magic character followed by a space), it's not necessarily the best way to use it. If you can retrain your muscle memory, these shortcuts are better as suffixes. "% fish" will only show the open tabs (in the current container) with "fish" in them. "fish %" does the same, but when you've only typed the "fish" part, it will have the full set of search suggestions. Which are generally quite good in Firefox, and if what you're looking for is already in an open tab, it'll probably be in the list. But sometimes I don't remember if I have the tab open, so a history result would be better. With the suffix, you get the best of both worlds: the initial "fish" may show too many things, so tacking on "fish %" will restrict it to just the open tab results. That avoids doing it in two passes and having to go back and edit to remove the restriction token.

The actual feature is richer than you might think. It's only hinted at in https://support.mozilla.org/en-US/kb/address-bar-autocomplet... but there's actually a little DSL for queries. You can build these things up into filters. "% fish # github" will search for open tabs with github in their title. So if you can too many results (with eg "% fish"), you can filter them down incrementally (by tacking on " # github"). Yes, this disagrees with the previous suggestion; I'm back to prefixes here.

See https://firefox-source-docs.mozilla.org/browser/urlbar/nonte... for gory details of the address bar's operation in general, though it doesn't go into detail about the restriction tokens.




It works fine without spaces for me.


Whoa, you're right! I know it used to be a problem, since I told several people about the feature, they tried it, it didn't work, and when looking at it I realized they were leaving off the space (or I hadn't even mentioned it).

Err... I attempted to update my comment. I guess it was too old but I still had the page open with an edit link present?

And now I notice that multiple other people are reporting that they still need the space. Something smells buggy....


Thank you. You are correct.

I thought i was losing my mind there fore a second when these commands didn't work for me!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: