mirror of
https://github.com/SinTan1729/movie-rename.git
synced 2024-12-25 11:48:37 -06:00
new: Print some message when flags are set
This commit is contained in:
parent
4f3f349292
commit
443c8e6cc9
1 changed files with 11 additions and 0 deletions
11
src/main.rs
11
src/main.rs
|
@ -16,6 +16,17 @@ async fn main() {
|
||||||
let flag_directory = settings["directory"];
|
let flag_directory = settings["directory"];
|
||||||
let flag_lucky = settings["i-feel-lucky"];
|
let flag_lucky = settings["i-feel-lucky"];
|
||||||
|
|
||||||
|
// Print some message when flags are set.
|
||||||
|
if flag_dry_run {
|
||||||
|
println!("Doing a dry run. No files will be modified.")
|
||||||
|
}
|
||||||
|
if flag_directory {
|
||||||
|
println!("Running in directory mode...")
|
||||||
|
}
|
||||||
|
if flag_lucky {
|
||||||
|
println!("Automatically selecting the first entry...")
|
||||||
|
}
|
||||||
|
|
||||||
// Try to read config file, or display error
|
// Try to read config file, or display error
|
||||||
let mut config_file = env::var("XDG_CONFIG_HOME").unwrap_or(String::from("$HOME"));
|
let mut config_file = env::var("XDG_CONFIG_HOME").unwrap_or(String::from("$HOME"));
|
||||||
if config_file == "$HOME" {
|
if config_file == "$HOME" {
|
||||||
|
|
Loading…
Reference in a new issue