shira Posted March 9, 2017 Share Posted March 9, 2017 Three or four times a week I run afoul of Alfred's URL search by typing something like: ag.vim install.py config.sh CSV::Converter etc. etc. Alfred thinks these are all URLs and tries to open them. Could we use a better regex to separate genuine from spurious URLs? Link to comment
shira Posted March 9, 2017 Author Share Posted March 9, 2017 Note that I don't want to just turn off the URL-recognition option; sometimes I actually do want to type a URL and open it, and that's useful. Link to comment
vitor Posted March 9, 2017 Share Posted March 9, 2017 install.py and config.sh are valid URLs, using the TLDs of Paraguay and Saint Helena, respectively. .vim doesn’t appear to be a valid TLD, but since anything can be one, now, there’s a chance it might actually become one. CSV::Converter isn’t detected as a URL, for me. Point being, I’m not sure what you ask for can be done. You can’t both keep URL detection on and ignore those examples. Unless you require http:// to be typed beforehand, but I doubt most people would want that as a default (might be a toggle, though). But URL detection should only trigger if you’re typing those words without context (i.e. not looking for files or activating a workflow), so what’s your use case for typing them in that context in the first place? How do they trip you up? Link to comment
Andrew Posted March 10, 2017 Share Posted March 10, 2017 Vitor is absolutely correct that TLDs are now open ended, so these are valid domains. @shira Have you included file search in your default results? This is a good reason to keep Alfred's default file search behaviour (focused default results, then using the open keyword, or [spacebar] prefix), as this means you'd type [spacebar]install.py to search for that as a file, or install.py to open this as a website. Cheers, Andrew [Moving to help forum] Link to comment
shira Posted March 10, 2017 Author Share Posted March 10, 2017 Fair point ... forgot about Paraguay and St. Helena, not to mention the open-ended TLD problem. "install.py" may not be a good example, as I can't think of when I would want to do an Internet search for that without some other words around it. But take "ag.vim", for instance (a Vim plugin). I might want to Google "ag.vim" and read about it, or find it on Github or something. If I type "ag.vim" in the box, I get no option to search the web for it; I see *only* the "open the typed url" option: I have to type a second word, e.g. "ag.vim repo", to trigger a web search. So I guess it would suffice to at least keep the "search the web" action available below the "open the typed url" action. Link to comment
vitor Posted March 10, 2017 Share Posted March 10, 2017 (edited) 19 minutes ago, shira said: I might want to Google "ag.vim" and read about it, or find it on Github or something. If I type "ag.vim" in the box, I get no option to search the web for it; I see *only* the "open the typed url" option: I have to type a second word, e.g. "ag.vim repo", to trigger a web search. So I guess it would suffice to at least keep the "search the web" action available below the "open the typed url" action. I recommend @deanishe’s Searchio!, then. Type g ag.vim and you’ll even get other recommendations. Edited March 10, 2017 by vitor Link to comment
Andrew Posted March 10, 2017 Share Posted March 10, 2017 @shira under Alfred's Advanced preferences, you can find some default modifiers, so you could make alt+return on a result always search in your top fallback (google by default) regardless of whether it matches something. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now