Created
August 22, 2017 05:55
-
-
Save tylorr/a9d78e3da10fa1e708b17b3fa66598e6 to your computer and use it in GitHub Desktop.
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 [[ $# > 0 ]] | |
do | |
key="$1" | |
case $key in | |
-o|-out) | |
OUT=1 | |
shift | |
;; | |
*) | |
shift | |
;; | |
esac | |
done | |
if [[ $OUT -eq 0 ]]; then | |
cat - > /dev/clipboard | |
else | |
cat /dev/clipboard | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimal implementation of
xclip
used by password-store in the MSYS2 environment.