Repository navigation
Replies: 1 comment
|
Two independent link sources here, and they behave differently — which is probably why the setting was easy to miss. A quick way to tell which one you are hitting: their defaults differ. OSC 8 links always show a 1. OSC 8 hyperlinksThese come from the program in the terminal ( const term = new Terminal({
linkHandler: { activate: () => { /* do nothing */ } }
});The default is not an immediate open — with no function defaultActivate(e, uri) {
const answer = confirm(`Do you want to navigate to ${uri}?\n\nWARNING: This link could potentially be dangerous`);
if (answer) { window.open()... }
}So with only OSC 8 links you already get asked; the no-op 2. URLs detected by
|
Uh oh!
There was an error while loading. Please reload this page.
Unfortunately I didn't find a suitable action on https://xtermjs.org/docs/api/terminal/interfaces/iterminaloptions/
Is it possible to use a code sequence (with a custom script/output) or via xterm.js settings to prevent the terminal from doing anything with the URL on left-click and display it as plain text (which can be copied to the clipboard)?
I would like to avoid accidentally opening the URL with an accidental click on it. Thanks
All reactions