commit: ccb2132c2296cdf983467b5fca1464028991ed62
parent: a75ac5d9bec2fb70390d60f9e82299a72766f8e1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 6 May 2018 22:01:01 +0200
sshpaste: Read from stdin when “-” is given
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Changelog.md b/Changelog.md
@@ -1,3 +1,6 @@
+## HEAD
+* Read from stdin when ``-`` is given
+
## 1.0.0rc2 — 2018-05-06 21:02
* Add ``-h`` option
* ``-x`` and ``-c`` are now explicitely exclusive
diff --git a/sshpaste b/sshpaste
@@ -114,6 +114,9 @@ else
for file in "$@"
do test -n "$file"
- sshpaste_file "$file"
+ if [ "$file" == '-' ]
+ then sshpaste_stdin
+ else sshpaste_file "$file"
+ fi
done
fi