From 5613ebb0387f90fd90f39d5bad8eb173196f931f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 14 Sep 2022 09:16:18 -0500 Subject: Update README --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 2e4ce10..dbf4953 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,55 @@ This is a POSIX-sh clone of that I made for my friend L. No guarantees or promises are made. + +## usage + +``` +$ foil.sh copy # copy from stdin to clipboard +$ foil.sh paste # paste from clipboard to stdout +``` + +there are cool aliases too: + +``` +$ foil.sh yeet # copy +$ foil.sh yoink # paste +``` + +**IN ADDITION**, you can just symlink `foil.sh` to `copy`, `paste`, `yoink`, or +`yeet`, and it'll Do The Right Thing: + +``` +$ yeet # same as foil.sh yeet +$ yoink # same as foil.sh yoink +``` + +`make install` from this repo will copy `foil.sh` to `yoink` and `yeet` in +`$(PREFIX)/bin` (default: `/usr/local/bin`). + +## dependencies + +`foil.sh` doesn't actually mangle your clipboard by itself. +instead it shells out (heh) to one of these: + +- `tmux` (if you're in tmux) +- `termux-clipboard-set`/`termux-clipboard-get` (if you're in termux) +- `wl-copy`/`wl-paste` (if you're using wayland) +- `pbpaste` +- `xsel` +- `xclip` +- `lemonade` +- `doitclient` +- `win32yank` +- `clip.exe`/`powershell.exe` (if you're using Windows) + +under cygwin-type systems, it'll write to or read from `/dev/clipboard`. + +basically, I try to follow the ZSH plugin above as closely as possible. + +## contributing + +of course, new clipboard technology is coming out all the time (allegedly). if +you have a new fancy clipboard editor and want me to add it, or if you've added +it yourself and have a patch, feel free to [email me](mailto:foil+git@acdw.net) +with a feature or merge request. -- cgit 1.4.1-21-gabe81