imag/lib/core/libimagrt/src
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
..
configuration.rs Adapt libimagrt to new error handling 2018-02-12 21:19:47 +01:00
error.rs Adapt libimagrt to new error handling 2018-02-12 21:19:47 +01:00
io.rs Provide LockedOutputProxy which holds locked variants of Stdout/Stderr 2018-03-04 15:42:00 +01:00
lib.rs Implement proxy object where runtime configures output 2018-03-04 13:57:44 +01:00
logger.rs Update dates in license header 2018-02-07 02:48:53 +01:00
runtime.rs Implement pipe magic in libimagrt 2018-03-10 15:43:44 +01:00
setup.rs Update dates in license header 2018-02-07 02:48:53 +01:00
spec.rs Update dates in license header 2018-02-07 02:48:53 +01:00
version.rs Use version string from git, if present 2018-02-13 11:53:51 +01:00