clip¶
Clipboard copy and paste.
Synopsis¶
Description¶
Copy to or paste from the system clipboard. Works cross-platform on Windows, macOS, and Linux.
Flags¶
| Flag | Short | Description | Default |
|---|---|---|---|
--paste |
-p |
Paste from clipboard to stdout | false |
Examples¶
Copy text to clipboard:
Copy from stdin:
Copy file contents:
Paste from clipboard:
Paste to file:
Pipe clipboard contents:
Notes¶
- When copying, if arguments are provided they are joined with spaces
- When no arguments are provided, reads from standard input
- Clipboard operations work with the system clipboard (same as Ctrl+C/Ctrl+V)
- On Linux, may require xclip or xsel to be installed