commit d7c1dafda499642daf24a897e84ef5c75a493688 parent 31b2577ecc9fd51bd3461ab677b875ff58dddb8d Author: parazyd <parazyd@dyne.org> Date: Sun, 24 Feb 2019 13:01:47 +0100 Support plumbing from argv. Diffstat:
M | p | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/p b/p @@ -4,7 +4,12 @@ # By parazyd # -clip="$(xclip -o)" + +if [ -n "$1" ]; then + clip="$1" +else + clip="$(xclip -o)" +fi [ -n "$clip" ] || { echo "plubmer: Nothing to plumb." >&2