3 e5bee144 2022-05-09 op clip is a small utility to manage the X clipboard sensibly. It's
4 e5bee144 2022-05-09 op meant to be used interactively, not in scripts.
6 e5bee144 2022-05-09 op if the standard input is not a tty, slurp everything (except the last
7 e5bee144 2022-05-09 op newline!) to the clipboard
9 e5bee144 2022-05-09 op if [ ! -t 0 ]; then
10 e5bee144 2022-05-09 op exec xclip -r -selection clipboard >/dev/null
13 e5bee144 2022-05-09 op otherwise output its contents
15 e5bee144 2022-05-09 op exec xclip -o -selection clipboard