Skip to content

Commit

Permalink
Fix the--show-themes command (#1320)
Browse files Browse the repository at this point in the history
The command failed because the two empty arguments for the internal `Opt`
parsing actually meant "<binary> <minus_file>" and since `minus_file` is now
parsed with `PathBufValueParser` and the value parser rejects empty values.
  • Loading branch information
nickelc authored Mar 1, 2023
1 parent f4be222 commit afd36da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subcommands/show_themes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn show_themes(dark: bool, light: bool, computed_theme_is_light: bool) -> st
let git_config = git_config::GitConfig::try_create(&env);
let opt = cli::Opt::from_iter_and_git_config(
env.clone(),
&["", "", "--navigate", "--show-themes"],
&["delta", "--navigate", "--show-themes"],
git_config,
);
let mut output_type =
Expand All @@ -41,7 +41,7 @@ pub fn show_themes(dark: bool, light: bool, computed_theme_is_light: bool) -> st
let git_config = git_config::GitConfig::try_create(&env);
let opt = cli::Opt::from_iter_and_git_config(
env.clone(),
&["", "", "--features", theme],
&["delta", "--features", theme],
git_config,
);
let is_dark_theme = opt.dark;
Expand Down

0 comments on commit afd36da

Please sign in to comment.