Matthias Beyer
ce0bd9298a
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> |
||
---|---|---|
.. | ||
core | ||
domain | ||
entry | ||
etc |