summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.c b/main.c
index e9f9939..fbb16b4 100644
--- a/main.c
+++ b/main.c
@@ -261,10 +261,11 @@ int main(int argc, char *argv[])
261 xs *c_msg = NULL; 261 xs *c_msg = NULL;
262 char *in_reply_to = GET_ARGV(); 262 char *in_reply_to = GET_ARGV();
263 263
264 if (strcmp(url, "-") == 0) { 264 if (strcmp(url, "-e") == 0) {
265 /* get the content from an editor */ 265 /* get the content from an editor */
266 FILE *f; 266 FILE *f;
267 267
268 unlink("/tmp/snac-edit.txt");
268 system("$EDITOR /tmp/snac-edit.txt"); 269 system("$EDITOR /tmp/snac-edit.txt");
269 270
270 if ((f = fopen("/tmp/snac-edit.txt", "r")) != NULL) { 271 if ((f = fopen("/tmp/snac-edit.txt", "r")) != NULL) {
@@ -279,6 +280,11 @@ int main(int argc, char *argv[])
279 } 280 }
280 } 281 }
281 else 282 else
283 if (strcmp(url, "-") == 0) {
284 /* get the content from stdin */
285 content = xs_readall(stdin);
286 }
287 else
282 content = xs_dup(url); 288 content = xs_dup(url);
283 289
284 msg = msg_note(&snac, content, NULL, in_reply_to, NULL); 290 msg = msg_note(&snac, content, NULL, in_reply_to, NULL);