mirror of
https://github.com/sharkdp/bat
synced 2026-08-09 19:51:48 +00:00
Credit syntax definition and theme authors with new --acknowledgements option (#1971)
The text that is printed is generated when building assets, by analyzing LICENSE and NOTICE files that comes with syntaxes and themes. We take this opportunity to also add a NOTICE file as defined by Apache License 2.0.
This commit is contained in:
+10
-3
@@ -47,9 +47,13 @@ fn build_assets(matches: &clap::ArgMatches) -> Result<()> {
|
||||
.map(Path::new)
|
||||
.unwrap_or_else(|| PROJECT_DIRS.cache_dir());
|
||||
|
||||
let blank = matches.is_present("blank");
|
||||
|
||||
bat::assets::build(source_dir, !blank, target_dir, clap::crate_version!())
|
||||
bat::assets::build(
|
||||
source_dir,
|
||||
!matches.is_present("blank"),
|
||||
matches.is_present("acknowledgements"),
|
||||
target_dir,
|
||||
clap::crate_version!(),
|
||||
)
|
||||
}
|
||||
|
||||
fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
|
||||
@@ -324,6 +328,9 @@ fn run() -> Result<bool> {
|
||||
} else if app.matches.is_present("cache-dir") {
|
||||
writeln!(io::stdout(), "{}", cache_dir())?;
|
||||
Ok(true)
|
||||
} else if app.matches.is_present("acknowledgements") {
|
||||
writeln!(io::stdout(), "{}", bat::assets::get_acknowledgements())?;
|
||||
Ok(true)
|
||||
} else {
|
||||
run_controller(inputs, &config)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user