about summary refs log tree commit diff stats

FOIL

copy and paste shit

This is a POSIX-sh clone of clipboard.zsh 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 with a feature or merge request.