pkgx icon indicating copy to clipboard operation
pkgx copied to clipboard

Open Terminal on Copy

Open Xercesblu3 opened this issue 3 years ago • 12 comments

We need an app developed/installed to the tea/cli to automatically open the terminal via the user’s web browser (tea www) when they click-to-copy the tea one-liner. The one-liner should be automatically pasted/entered into the terminal upon starting. Currently, the tea/cli asks users if they would like to install tea via a y/n question. If this could be bypassed, that would better ensure an install, but will defer to mxcl. Not giving devs an options may piss them off.

The imperative of this is two fold:

  1. we ensure more installs from marketing efforts/page visits
  2. we are able to confirm that a btn-click on www equates to an install (this will help Gypsy to determine which ad channels are performing best)

Xercesblu3 avatar Oct 26 '22 16:10 Xercesblu3

I don't think this is likely possible. The browser letting you run arbitrary unknown applications on link click would be a monstrous security hole. I also think it would be very alienating to users, but since I don't think this would work, that's a secondary concern.

jhheider avatar Oct 26 '22 17:10 jhheider

I mean I wouldn't like it if my browser tried to open any local applications. But Zoom somehow does it.

Xercesblu3 avatar Oct 26 '22 17:10 Xercesblu3

Zoom registers a handler with the browser to receive zoom:// URLs. It might be possible to find a registered URL scheme that will just run our script, after prompting, but that would be so easily used to install malware that I'm skeptical.

jhheider avatar Oct 26 '22 17:10 jhheider

we can do it, like zoom does it

needs an app. I don't think doing it via copy/paste makes sense tho.

mxcl avatar Oct 26 '22 19:10 mxcl

For the installer? I could see registering a handler for tea commands in browsers we can find, but I don't think the installer can rely on that.

jhheider avatar Oct 26 '22 19:10 jhheider

These requirements are not particularly clear TBH. @Xercesblu3 pls summarize in two sentences.

mxcl avatar Oct 26 '22 20:10 mxcl

@mxcl does this help?

When using the click to copy button for the install script, we want an app that will open the terminal on the users computer and paste the code into the terminal automatically.

Xercesblu3 avatar Oct 27 '22 14:10 Xercesblu3

I disagree that clicking “copy” should do anything except copy.

A separate button to “open in terminal” makes sense though. I can’t tag Tom here for some reason, @Xercesblu3 please get Tom to check this thread out.

mxcl avatar Oct 31 '22 12:10 mxcl

It's because he's an outside collaborator and only had access to 'www'. Adding him as a member now so he can have read access to more.

Xercesblu3 avatar Oct 31 '22 14:10 Xercesblu3

@tsmitty11 should work now!

Xercesblu3 avatar Oct 31 '22 14:10 Xercesblu3

@mxcl @Xercesblu3 I can add an "open in terminal" button. I'll noodle that around today to figure out how best to lock it up with the current design.

Probs better for managing user expectations.

tsmitty11 avatar Oct 31 '22 15:10 tsmitty11

@mxcl @Xercesblu3 I opened a draft PR with the necessary UI changes for the 'open in terminal' button. That PR can be found here, and here's a Loom video showing the change:

https://www.loom.com/share/c0b7616789c14a8585f064d9324170b5

tsmitty11 avatar Nov 04 '22 20:11 tsmitty11

Closing in favor of tea/gui

mxcl avatar Nov 17 '22 14:11 mxcl

A candidate for the “most misleading ticket title” ever IMO.

mxcl avatar Nov 17 '22 14:11 mxcl

@mxcl what title would have been better? Want to try and improve there

Xercesblu3 avatar Nov 17 '22 14:11 Xercesblu3

On Copy what? This is the repo for tea/cli, the fact it was for copying for the website requires a leap of faith and judgement to conclude without reading the body text.

Open Terminal to do what? Typically if you open a terminal you just get a prompt. This is not what was asked in the body text.

And as we discussed, we didn't want it for copy so at that point the title needed to be changed.

mxcl avatar Nov 17 '22 15:11 mxcl