# HG changeset patch # User boredzo # Date 1215639304 0 # Node ID 5f49950abfbb8c3c6abcb9c9d552c9a3c1574aaa # Parent c78b283d2fca91e1417335e6c870c30201debdb9 Added a prompt message for when stdin and stdout are a tty (i.e., when the user simply types “growlnotify foo” and doesn't specify a description). diff -r c78b283d2fca -r 5f49950abfbb Extras/growlnotify/main.m --- a/Extras/growlnotify/main.m Mon Jul 07 19:34:48 2008 +0000 +++ b/Extras/growlnotify/main.m Wed Jul 09 21:35:04 2008 +0000 @@ -316,6 +316,9 @@ desc = CFStringCreateWithCString(kCFAllocatorDefault, message, kCFStringEncodingUTF8); } else { // Deal with stdin + if (isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)) + fputs("Enter a notification description, followed by newline, followed by Ctrl-D (End of File). To cancel, press Ctrl-C.\n", stdout); + char buffer[4096]; CFMutableStringRef temp = CFStringCreateMutable(kCFAllocatorDefault, 0); while (!feof(stdin)) {