Skip to content

Commit

Permalink
Treat --sort-paths as a flag option
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Nov 24, 2023
1 parent 4c6336f commit 3e5783c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,8 @@ When multiple overrides are specified, the first matching override wins."))
)
.arg(
Arg::new("sort-paths").long("sort-paths")
.value_name("on/off")
.env("DFT_SORT_PATHS")
.possible_values(["on", "off"])
.default_value("off")
.help("Enable or disable sorting of paths when displaying results of directory diff.")
.help("When diffing a directory, output the results sorted by path. This is slower.")
)
.arg_required_else_help(true)
}
Expand Down Expand Up @@ -584,7 +581,7 @@ pub(crate) fn parse_args() -> Mode {

let syntax_highlight = matches.value_of("syntax-highlight") == Some("on");

let sort_paths = matches.value_of("sort-paths") == Some("on");
let sort_paths = matches.is_present("sort-paths");

let graph_limit = matches
.value_of("graph-limit")
Expand Down

0 comments on commit 3e5783c

Please sign in to comment.