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> |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
Cargo.toml | ||
README.md |
libimagrt
This library provides utility functionality for the modules and the binary frontends, such as reading and parsing the configuration file, a builder helper for the commandline interface and such.
It also contains the store object and creates it from configuration.
the libimagrt::runtime::Runtime
object is the first complex object that comes
to live in a imag binary.
Long-term TODO
- Merge with
libimagstore