Skip to content

Commit 1a07b33

Browse files
authored
send-im: Allow both stdin and no stdin
1 parent 68e3b5c commit 1a07b33

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Terminal/send-im

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/bash
22

3-
tee | EDITOR="vim -c startinsert" vipe | tee /tmp/.last_im | xargs -0 -i purple-remote-custom "facebook:goim?alias=$@&message={}"
3+
if [ -t 0 ]; then
4+
echo | EDITOR="vim -c startinsert" vipe | tee /tmp/.last_im | xargs -0 -i purple-remote-custom "facebook:goim?alias=$@&message={}"
5+
else
6+
tee | EDITOR="vim -c startinsert" vipe | tee /tmp/.last_im | xargs -0 -i purple-remote-custom "facebook:goim?alias=$@&message={}"
7+
fi

0 commit comments

Comments
 (0)