I had a brain-fart and accidentally typed in "news://[search term]" as a URL in both Chrome and Safari on Mac and for some reason the Terminal opened up. Anyone know why it does this?
that sounds right to me, but I still don't know why it would launch Usenet... any who! I guess we have a way to launch terminal.
Ps I just tried it with a URL and it works too, you can create an href with the news:// predicate and it launches a terminal, but I can't seem to pass anything along to the terminal. Could have been useful for CLI commands instead of the copy/paste approach.
news:// points to Usenet resources the same way https:// points to the World Wide Web. It's up to your browser and OS what actually happens when you click a news:// URL.
There are MacOS clients for Usenet in case you actually want to handle those correctly (not sure why you would though).
> I can't seem to pass anything along to the terminal
You should not be able to pass anything to the terminal this way, any more than "https://rm" would pass "rm" to your terminal.
> Could have been useful for CLI commands instead of the copy/paste approach
This would be a terrifying security risk. You should not be able to click something and have your terminal suddenly filled with someone else's text.
The post itself and smt88's reply are quite interesting because I tried the same in Safari on macOS 11.3.1 and all I got was :
Safari can't open the specified address.
The terminal did not open up as such. In your case, did the terminal just open up with a blank screen? Maybe it didn't for me because I already had the Terminal open in the background with a few tmux tabs. Either way, if the behavior were to be replicated, at least the terminal should have become the parent window.
7 comments
[ 2.7 ms ] story [ 25.8 ms ] threadPs I just tried it with a URL and it works too, you can create an href with the news:// predicate and it launches a terminal, but I can't seem to pass anything along to the terminal. Could have been useful for CLI commands instead of the copy/paste approach.
I don't think my meaning was clear.
news:// points to Usenet resources the same way https:// points to the World Wide Web. It's up to your browser and OS what actually happens when you click a news:// URL.
There are MacOS clients for Usenet in case you actually want to handle those correctly (not sure why you would though).
> I can't seem to pass anything along to the terminal
You should not be able to pass anything to the terminal this way, any more than "https://rm" would pass "rm" to your terminal.
> Could have been useful for CLI commands instead of the copy/paste approach
This would be a terrifying security risk. You should not be able to click something and have your terminal suddenly filled with someone else's text.