Skip to content
Myr

Add --output=inherit as an alias for --show-output

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tavian Barnes · committed by David Peter · parent dfd1046 · Browse files · 2 files+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−0 removed

  • other:+2 added−0 removed

2 files+2 added−0 removed

modified:src/cli.rs+1 added
270 unmodified lines
271 Note that some programs like 'grep' detect when standard output is /dev/null \272 and apply certain optimizations. To avoid that, consider using \273 '--output=pipe'.\n\n\274 pipe: Feed the output through a pipe before discarding it.\n\n\275 inherit: Don't redirect the output at all (same as '--show-output').\n\n\276 <FILE>: Write the output to the given file.",277 ),278 )279 .arg(
22 unmodified lines
modified:src/options.rs+1 added
272 unmodified lines
273 } else if let Some(output) = matches.value_of("output") {274 match output {275 "null" => CommandOutputPolicy::Discard,276 "pipe" => CommandOutputPolicy::Pipe,277 "inherit" => CommandOutputPolicy::Forward,278 path => CommandOutputPolicy::File(path.into()),279 }280 } else {281 CommandOutputPolicy::Discard
112 unmodified lines