mosh-chrome icon indicating copy to clipboard operation
mosh-chrome copied to clipboard

Detect links / URLs, open on ctrl+click

Open alexsapps opened this issue 6 years ago • 14 comments

The normal SSH/hterm/shell app for Chrome detects URLs and underlines them on hover and opens the link on ctrl+click. I'd like this for mosh-chrome too.

alexsapps avatar May 25 '18 14:05 alexsapps

I am surprised to learn that the released Mosh for Chrome has such an old hterm that this feature isn't available! I really need to do a release.

In the interim, you can install "Mosh for Chrome (dev)" from the Chrome Web Store and get the ctrl+click functionality. (Although, I have not seen underlines... is that an option in hterm?)

rpwoodbu avatar May 26 '18 06:05 rpwoodbu

it's news to me that hterm automatically underlines links :)

maybe you're thinking of OSC-8 instead ?

ctrl+click does work in the latest hterm though.

vapier avatar May 26 '18 09:05 vapier

Sorry I was wrong about automatic underlining. My usual SSH host was down at the time of writing so I just went off the best of my (wrong) memory.

alexsapps avatar May 31 '18 02:05 alexsapps

fwiw, i'm running this on latest hterm, and URLs are not clickable...

perhaps there is some other flag to pass to make that possible.

gordol avatar Jun 15 '18 07:06 gordol

it's hard to guess at what you're trying to do exactly. did you hold Ctrl down before clicking?

vapier avatar Jun 15 '18 18:06 vapier

did you hold Ctrl down before clicking

yep.

i figured out the problem... it works if i'm not in tmux, otherwise, tmux seems to be capturing the mouse input and it never triggers, or something... maybe it's the ctrl modifier key. either way, ctrl+click on latest hterm does indeed work, in a plain shell

gordol avatar Jun 22 '18 09:06 gordol

sounds like you turned on tmux's mouse mode

vapier avatar Jun 22 '18 15:06 vapier

mouse mode or not, it doesn't work within tmux, btw. i know how to turn mouse mode on and off, lol

gordol avatar Jun 22 '18 22:06 gordol

my point is, if you've turned on mouse mode, then hterm should not be hijacking ctrl+mouse for its own use. your clicks (including key modifiers) are sent to the remote side so it can interpret things.

if you google for 'tmux mouse mode', you'll find some docs to control it.

vapier avatar Jun 23 '18 02:06 vapier

... I literally just said I know about mouse mode in tmux. what's your point? lol

gordol avatar Jun 23 '18 02:06 gordol

this works if you just use latest libapps. see my fork here for an example: https://github.com/gordol/mosh-chrome/commit/75b0057abfa7b16626f499e6322890d6ff25744a

gordol avatar Jun 23 '18 02:06 gordol

@gordol, be sure you're running "Mosh (dev)" from the Chrome Web Store. I mentioned in my first comment that this isn't in the released version (non-dev). I hope to do a release soon.

rpwoodbu avatar Jul 15 '18 05:07 rpwoodbu

I'm running my own fork that's more updated than the dev build in the app store.

gordol avatar Jul 15 '18 06:07 gordol

@gordol Sure, but I think you'll find this works at HEAD, which is pushed to "Mosh (dev)". (Yes, I know, I need to do a stable release...)

Also, I forgot to mention that I use tmux 100% of the time, and don't have troubles clicking links. I don't have mouse mode enabled.

rpwoodbu avatar Jul 15 '18 06:07 rpwoodbu