Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support copying text (OSC52) & hyperlinks (OSC8) #82

Merged
merged 4 commits into from
Jun 2, 2022
Merged

Conversation

aymanbagabas
Copy link
Collaborator

  • Add OSC52 to support copying text
  • Add OSC8 to support hyperlinks

OSC52 needs to read $TERM to determine the terminal. This implements two interfaces, File and Environ, and uses them when creating a new Output.

| Windows Terminal | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |

[^vte]: This covers all vte-based terminals, including Gnome Terminal, guake, Pantheon Terminal, Terminator, Tilix, XFCE Terminal.
| Terminal | Alt Screen | Query Color Scheme | Query Cursor Position | Set Window Title | Change Cursor Color | Change Default Foreground Setting | Change Default Background Setting | Copy (OSC52) | Hyperlinks (OSC8) |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this starts horizontally scrolling on GitHub, we should think about breaking this up in two tables maybe: standard and advanced feature sets or something.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this is fine. Having this in one table makes it easy to reference all the supported features in one place.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its ok too

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really? I hate this 😆
image

@muesli
Copy link
Owner

muesli commented Jun 1, 2022

I'm confused, what changed between #80 and #82? 😄

@muesli
Copy link
Owner

muesli commented Jun 1, 2022

Not a big fan of _examples. It feels clunky, doesn't really solve the problem (now you can't try / run the example) and in the long run probably just leads to this code being neglected and broken.

@aymanbagabas
Copy link
Collaborator Author

I'm confused, what changed between #80 and #82? 😄

haha I rebased it and created this pr from a local branch instead of my fork.

@aymanbagabas
Copy link
Collaborator Author

Not a big fan of _examples. It feels clunky, doesn't really solve the problem (now you can't try / run the example) and in the long run probably just leads to this code being neglected and broken.

good point, made examples/ssh into its own module with a separate go.mod

| Windows Terminal | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |

[^vte]: This covers all vte-based terminals, including Gnome Terminal, guake, Pantheon Terminal, Terminator, Tilix, XFCE Terminal.
| Terminal | Alt Screen | Query Color Scheme | Query Cursor Position | Set Window Title | Change Cursor Color | Change Default Foreground Setting | Change Default Background Setting | Copy (OSC52) | Hyperlinks (OSC8) |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its ok too

@muesli muesli merged commit 260b51f into termenv-next Jun 2, 2022
@caarlos0 caarlos0 deleted the copy branch June 29, 2022 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants