Skip to content

Commit

Permalink
Bugfix: markdown is now a flag instead of a boolean argument
Browse files Browse the repository at this point in the history
  • Loading branch information
craigmayhew committed Jan 29, 2024
1 parent 1cb537a commit 8b20496
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// atty to determine if data is piped in or not
use atty::Stream;
// clap for command line argument parsing
use clap::{Arg, command, Command, value_parser};
use clap::{Arg, ArgAction, command, Command, value_parser};
// logging
use log::{info, debug};
// openai api
Expand Down Expand Up @@ -135,7 +135,7 @@ fn args_setup() -> Command {
.value_name("markdown")
.help("Render markdown instead of outputting as plain text")
.required(false)
.value_parser(value_parser!(bool));
.action(ArgAction::SetTrue);

let max_tokens_arg = Arg::new("max_tokens")
.short('m')
Expand Down

0 comments on commit 8b20496

Please sign in to comment.