@@ -190,11 +190,10 @@ impl App {
190190 .long("plain")
191191 .conflicts_with("style")
192192 .conflicts_with("number")
193− .conflicts_with("wrap")
194− .help("Show plain style (alias for '--style=plain' and '--wrap=never').")
193+ .help("Show plain style (alias for '--style=plain'.")
195194 .long_help(
196− "Only show plain style, no decorations, no wrapping. This is an alias for \
197− '--style=plain' and '--wrap=never'",
195+ "Only show plain style, no decorations. This is an alias for \
196+ '--style=plain'",
198197 ),
199198 ).arg(
200199 Arg::with_name("number")
@@ -264,8 +263,8 @@ impl App {
264263 .overrides_with("wrap")
265264 .takes_value(true)
266265 .value_name("mode")
267− .possible_values(&["character", "never"])
268− .default_value("character")
266+ .possible_values(&["auto", "never", "character"])
267+ .default_value("auto")
269268 .help("Specify the text-wrapping mode.")
270269 .long_help("Specify the text-wrapping mode."),
271270 ).arg(
@@ -340,22 +339,24 @@ impl App {
340339
341340 pub fn config(&self) -> Result<Config> {
342341 let files = self.files();
342+ let output_components = self.output_components()?;
343343
344344 Ok(Config {
345345 true_color: is_truecolor_terminal(),
346− output_components: self.output_components()?,
347346 language: self.matches.value_of("language"),
348347 output_wrap: if !self.interactive_output {
349348 // We don't have the tty width when piping to another program.
350349 // There's no point in wrapping when this is the case.
351350 OutputWrap::None
352− } else if self.matches.is_present("plain") {
353− // No point in wrapping when it's plain.
354− OutputWrap::None
355351 } else {
356352 match self.matches.value_of("wrap") {
357353 Some("character") => OutputWrap::Character,
358− Some("never") | _ => OutputWrap::None,
354+ Some("never") => OutputWrap::None,
355+ Some("auto") | _ => if output_components.plain() {
356+ OutputWrap::None
357+ } else {
358+ OutputWrap::Character
359+ },
359360 }
360361 },
361362 colored_output: match self.matches.value_of("color") {
@@ -397,6 +398,7 @@ impl App {
397398 .or_else(|| env::var("BAT_THEME").ok())
398399 .unwrap_or(String::from(BAT_THEME_DEFAULT)),
399400 line_range: transpose(self.matches.value_of("line-range").map(LineRange::from))?,
401+ output_components,
400402 })
401403 }
402404