TTY-COPY(1)

πŸ“¦
version 0.2.2 Β· 5 versions
, in epel 9

πŸ’– TTY-COPY(1) β€” the tty-copy manual, bestie πŸ’–

okay so this is the manual page for tty-copy, aka TTY-COPY(1), and it’s literally about yeeting text into your system clipboard through the TTY. no cap, it’s giving tiny utility with main character energy. 🫢


🌸 NAME 🌸

tty-copy β€” copy content to the system clipboard via TTY. periodt. πŸ’…

✨ SYNOPSIS ✨

tty-copy [options] [<text...>]

πŸ¦‹ DESCRIPTION πŸ¦‹

tty-copy copies the given text to the controlling TTY using OSC 52 escape sequence and base64 encoding. If no text is given, tty-copy copies data from its standard input. slay. ✨

This allows terminals that support OSC 52 to copy the data into the system clipboard. It works in any terminal session, whether local, remote, or even nested therein! The supporting terminal must obviously (a) support OSC 52 and (b) have permission to access the clipboard. iykyk. πŸ’–

The maximum length of an OSC 52 escape sequence is originally 100 000 bytes in total which means 74 994 bytes of plain text. However, some terminal emulators have higher limit; for example, kitty allows up to 8 MiB by default. lowkey generous. πŸŽ€

For the specification see the section Operating System Controls, code 52, Manipulate Selection Data, in Xterm Control Sequences (https://www.xfree86.org/current/ctlseqs.html). 🌈

πŸ’… OPTIONS πŸ’…

  • -c, --clear β€” Instead of copying anything, clear the clipboard so that nothing is copied. bye bye clipboard content πŸ‘‹
  • -n, --trim-newline β€” Do not copy the trailing newline character. no sneaky newline, bestie βœ‚οΈ
  • -o <file>, --output <file> β€” Path of the terminal device (defaults to /dev/tty). that’s the default, fr fr πŸ–₯️
  • -p, --primary β€” Use the β€œprimary” clipboard (selection) instead of the regular clipboard. primary selection girlies rise 🫢
  • -T <type>, --term <type> β€” Specify the type of the terminal. Currently, only "screen" and "tmux" are recognized, any other value is interpreted as the default.

If not specified, "screen" and "tmux" are autodetected based on the TERM and TMUX environment variables. detective mode activated πŸ”

  • -t, --test β€” Test whether your terminal processes the OSC 52 escape sequence β€” if it does, exits with status code 0, otherwise with 1.

The fact that the terminal processes the sequence does not necessarily mean that access to the system clipboard will work β€” it may be disabled. This option only tests if the sequence is intercepted by the terminal or visibly printed on the screen. important caveat, bestie ⚠️

  • -V, --version β€” Display the version of tty-copy and exit. version check, iconic πŸ’œ
  • -h, --help β€” Display the help message and exit. help me help you 🧚

πŸ”₯ EXIT CODES πŸ”₯

  • 0 β€” Clean exit, no error has encountered. ✨
  • 1 β€” General error. 😭
  • 10 β€” Invalid usage. πŸ™ˆ
  • 11 β€” I/O error. πŸ’€

πŸ‘‘ AUTHORS πŸ‘‘

Jakub Jirutka. author icon behavior, honestly. 🫢

πŸ› REPORTING BUGS πŸ›

Report bugs to the project’s issue tracker at https://github.com/jirutka/tty-copy/issues. don’t be shy, bestie β€” bugs deserve their moment too. 🌸


ttys and kisses πŸ’‹ β€” this was the tty-copy manual, source/version tag TTY-COPY(1), dated 2024-07-20. bye bestie! πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from