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

Establish new private ANSI escape code that disables cursor selection #20

Open
septatrix opened this issue Oct 27, 2024 · 0 comments
Open

Comments

@septatrix
Copy link

One of the great advantages of asciinema playbacks is that text can be selected. However, when one wants to copy commands it is undesirable to also copy e.g. the prompt. This means that one has to copy each command individually, or manually remove the prompt when selecting a whole range of commands.

ANSI allows private mode controls of which we could use a few to signal the start/end of a section which should not be selectable when rendered as HTML (using the user-select CSS property). The simplest solution would be to declare a sequence which starts such a block and one to end such a block (though a more powerful solution might declare different modes for prompts, user written commands, and normal program output).
These escape codes could then outputted be shell prompts before and after printing the prompt.

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

No branches or pull requests

1 participant