Remove deprecated --config-path command

This commit is contained in:
Danilo Bargen 2022-10-01 23:52:03 +02:00
commit 0c93a4cfe9
3 changed files with 0 additions and 27 deletions

View file

@ -21,7 +21,6 @@ OPTIONS:
-r, --raw Display the raw markdown instead of rendering it
-q, --quiet Suppress informational messages
--show-paths Show file and directory paths used by tealdeer
--config-path Show config file path
--seed-config Create a basic config
--color <WHEN> Control whether to use color [possible values: always, auto, never]
-v, --version Print the version

View file

@ -93,10 +93,6 @@ pub(crate) struct Args {
#[clap(long = "show-paths")]
pub show_paths: bool,
/// Show config file path
#[clap(long = "config-path")]
pub config_path: bool,
/// Create a basic config
#[clap(long = "seed-config")]
pub seed_config: bool,

View file

@ -140,19 +140,6 @@ fn update_cache(cache: &Cache, quietly: bool, enable_styles: bool) {
}
}
/// Show the config path (DEPRECATED)
fn show_config_path(enable_styles: bool) {
match get_config_path() {
Ok((config_file_path, _)) => {
println!("Config path is: {}", config_file_path.to_str().unwrap());
}
Err(e) => {
print_error(enable_styles, &e.context("Could not look up config path"));
process::exit(1);
}
}
}
/// Show file paths
fn show_paths(config: &Config) {
let config_dir = get_config_dir().map_or_else(
@ -290,15 +277,6 @@ fn main() {
}
args.platform = args.platform.or(args.os);
// Show config file and path, pass through
if args.config_path {
print_warning(
enable_styles,
"The --config-path flag is deprecated, use --show-paths instead",
);
show_config_path(enable_styles);
}
// Look up config file, if none is found fall back to default config.
let config = match Config::load(enable_styles) {
Ok(config) => config,