Skip to content

Add OSC52 Support #2366

Closed
Closed
@ikey4u

Description

@ikey4u

Is your feature request related to a problem? Please describe.

I do development on a remote server using ssh, I love gitui and use it daily on my remote server. it seems that gitui uses xsel on Linux to copy text, but in my case it will give error likes:

copy to clipboard error: 
`"xsel"`: /usr/bin/xsel: Can't open display: (null)  
 Inappropriate ioctl for device

This error is caused that I do not forward X11 when login into the server using ssh. We know that gitui does not need to run any graphics since it works great on terminal without X on Linux, and the error will mislead the user.

As a result, I think gitui should have a better solution to support text copy.

Describe the solution you'd like

I hope that gitui will support OSC52 encoding. This encoding is supported by many terminals, for example wezterm, iterm. OSC52 supports you copy text from remote server to your clipboard of local machine.

Additional context

vim has a plugin vim-oscyank to support OSC52, it should be a good reference implmentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions