1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-09 19:51:48 +00:00

Move config-dir and cache-dir from 'bat cache' to 'bat'

This commit is contained in:
sharkdp
2019-02-07 22:37:12 +01:00
committed by David Peter
parent cff01d81fa
commit e09499b3df
4 changed files with 27 additions and 24 deletions
+6 -4
View File
@@ -96,10 +96,6 @@ fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
assets.save(target_dir)?;
} else if matches.is_present("clear") {
clear_assets();
} else if matches.is_present("config-dir") {
writeln!(io::stdout(), "{}", config_dir())?;
} else if matches.is_present("cache-dir") {
writeln!(io::stdout(), "{}", cache_dir())?;
}
Ok(())
@@ -234,6 +230,12 @@ fn run() -> Result<bool> {
} else if app.matches.is_present("config-file") {
println!("{}", config_file().to_string_lossy());
Ok(true)
} else if app.matches.is_present("config-dir") {
writeln!(io::stdout(), "{}", config_dir())?;
Ok(true)
} else if app.matches.is_present("cache-dir") {
writeln!(io::stdout(), "{}", cache_dir())?;
Ok(true)
} else {
run_controller(&config)