Rename config file to config.toml
parent
449e526953
commit
dbc0fd81af
|
@ -4,7 +4,7 @@
|
||||||
# The syntax for including other configuration files is enclosed in `:
|
# The syntax for including other configuration files is enclosed in `:
|
||||||
#`# include "account_one"`
|
#`# include "account_one"`
|
||||||
#`# include "./account_two"`
|
#`# include "./account_two"`
|
||||||
#`# include "/home/absolute/path/to/shortcuts/config"`
|
#`# include "/home/absolute/path/to/shortcuts/config.toml"`
|
||||||
# That is, the # in the beginning is part of the include directive.
|
# That is, the # in the beginning is part of the include directive.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
|
@ -191,7 +191,7 @@ fn run_app() -> Result<()> {
|
||||||
println!("");
|
println!("");
|
||||||
println!("\t--help, -h\t\tshow this message and exit");
|
println!("\t--help, -h\t\tshow this message and exit");
|
||||||
println!("\t--version, -v\t\tprint version and exit");
|
println!("\t--version, -v\t\tprint version and exit");
|
||||||
println!("\t--create-config[ PATH]\tcreate a sample configuration file with available configuration options. If PATH is not specified, meli will try to create it in $XDG_CONFIG_HOME/meli/config");
|
println!("\t--create-config[ PATH]\tcreate a sample configuration file with available configuration options. If PATH is not specified, meli will try to create it in $XDG_CONFIG_HOME/meli/config.toml");
|
||||||
println!(
|
println!(
|
||||||
"\t--test-config PATH\ttest a configuration file for syntax issues or missing options."
|
"\t--test-config PATH\ttest a configuration file for syntax issues or missing options."
|
||||||
);
|
);
|
||||||
|
@ -222,7 +222,7 @@ fn run_app() -> Result<()> {
|
||||||
if let Some(config_path) = args.create_config.as_mut() {
|
if let Some(config_path) = args.create_config.as_mut() {
|
||||||
let config_path: PathBuf = if config_path.is_empty() {
|
let config_path: PathBuf = if config_path.is_empty() {
|
||||||
let xdg_dirs = xdg::BaseDirectories::with_prefix("meli").unwrap();
|
let xdg_dirs = xdg::BaseDirectories::with_prefix("meli").unwrap();
|
||||||
xdg_dirs.place_config_file("config").map_err(|e| {
|
xdg_dirs.place_config_file("config.toml").map_err(|e| {
|
||||||
MeliError::new(format!(
|
MeliError::new(format!(
|
||||||
"Cannot create configuration directory in {}:\n{}",
|
"Cannot create configuration directory in {}:\n{}",
|
||||||
xdg_dirs.get_config_home().display(),
|
xdg_dirs.get_config_home().display(),
|
||||||
|
|
|
@ -295,7 +295,7 @@ impl FileSettings {
|
||||||
Err(_) => xdg_dirs
|
Err(_) => xdg_dirs
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.place_config_file("config")
|
.place_config_file("config.toml")
|
||||||
.expect("cannot create configuration directory"),
|
.expect("cannot create configuration directory"),
|
||||||
};
|
};
|
||||||
if !config_path.exists() {
|
if !config_path.exists() {
|
||||||
|
|
Loading…
Reference in New Issue