Copy output to clipboard. Cross-platform.
If you like the idea click ⭐ on the repo and tweet.
To install use pip:
xpip install xontrib-clp
# OR: xpip install -U git+https://github.com/anki-code/xontrib-clp
xontrib load clp
echo hello | clp # Copy "hello\n" to clipboard
$XONTRIB_CLP_ALIAS = 'pyperclip' # default
xontrib load clp
echo hello | clp # Copy "hello\n" to clipboard using pyperclip
$XONTRIB_CLP_ALIAS = 'shutil'
xontrib load clp
echo hello | clp # Copy "hello\n" to clipboard using platform-depending tool:
# pbcopy (Mac), xclip (Linux), clip.exe (Windows), etc
If you need to paste the text and write to the file:
pst > /tmp/file
# Paste:
# <text>
cat /tmp/file
# <text>
This package was created with xontrib template.