-
-
Save jdsumsion/5084496 to your computer and use it in GitHub Desktop.
X Clipboard helper script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# While 'xclip' is helpful, it's way too verbose, | |
# and the defaults are unhelpful for common | |
# "Ctrl-C/V" type usages. | |
# | |
# This 'xcl' utility transforms 'xclip' into a | |
# helpful cmdline friend. | |
# | |
# usage: | |
# - cat some_file | xcl | |
# - xcl > some_file | |
# | |
# read from clipboard if stdin is a tty, otherwise write to clipboard | |
[ -t 0 ] && xclip -o -selection clipboard || xclip -i -selection clipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment