Jump to content

don't try to open urls that are not urls


Recommended Posts

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

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

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

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:

 

58c2cad346cb5_MessagesImage(1821263421).png.758d567b870d59102e03604f1297a7b9.png

 

 

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
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:

 

58c2cad346cb5_MessagesImage(1821263421).png.758d567b870d59102e03604f1297a7b9.png

 

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.

DZxTHw8.png

Edited by vitor
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...