imag/lib
Matthias Beyer ce0bd9298a Implement pipe magic in libimagrt
When we merged the changes in libimagrt so that it automatically detects
whether stdin/stdout is a TTY and provides the user with stderr in case
stdout is not a TTY, we forgot that things like

    imag foo | grep bar

becomes impossible with that, because imag detects that stdout is not a
tty and automatically uses stderr for output.

But in this case, we don't want that. The output has to be stdout in
this case.

With this change, we have a flag in the runtime ("--pipe-magic" or "-P",
globally available) which turns on "pipe magic".

The expected behaviour is the following, if "-P" is passed:

* If stdout is a TTY, we print to stdout
* If stdout is not a TTY, we print to stderr
* If stdin is not a TTY, we do not provide it

If "-P" is not passed, we allow the user of libimagrt to use stdin for
interactive stuff (the interactive stuff is not yet implemented).

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-03-10 15:43:44 +01:00
..
core Implement pipe magic in libimagrt 2018-03-10 15:43:44 +01:00
domain Rebuild DiaryEntryIterator to be based on StoreIdIterator 2018-03-02 21:25:48 +01:00
entry Provide unlink() to remove all links 2018-02-25 18:59:02 +01:00
etc Update version string: 0.6.0 -> 0.7.0 2018-02-11 14:22:24 +01:00