diff --git a/README.md b/README.md index 445d1fc..2c50496 100644 --- a/README.md +++ b/README.md @@ -40,19 +40,20 @@ All the files will be deployed to their target locations. Check out `dotter -h` for the command-line flags that Dotter supports: ``` -Dotter 0.10.4 +Dotter 0.10.5 A small dotfile manager. Note that flags and options have to come BEFORE subcommands USAGE: - dotter.exe [FLAGS] [OPTIONS] [SUBCOMMAND] + dotter [FLAGS] [OPTIONS] [SUBCOMMAND] FLAGS: - --dry-run Dry run - don't do anything, only print information. Implies RUST_LOG=info unless specificed - otherwise - --force Force - instead of skipping, overwrite target files if their content is unexpected. Overrides - --dry-run and implies RUST_LOG=warn unless specified otherwise - -h, --help Prints help information - -V, --version Prints version information + -d, --dry-run Dry run - don't do anything, only print information. Implies -v at least once + --force Force - instead of skipping, overwrite target files if their content is unexpected. Overrides --dry-run + -h, --help Prints help information + -y, --noconfirm Assume "yes" instead of prompting when removing empty directories + -q, --quiet Quiet - only print errors + -V, --version Prints version information + -v, --verbose Verbosity level - specify up to 3 times to get more detailed output OPTIONS: --cache-directory Directory to cache into [default: .dotter/cache] @@ -62,14 +63,10 @@ OPTIONS: SUBCOMMANDS: deploy Deploy the files to their respective targets. This is the default subcommand - diff Print the differences that will result when running a deploy (in templates only). Does not actually - execute the deploy help Prints this message or the help of the given subcommand(s) - init Initialize global.toml with a single package containing all the files in the current directory - pointing to a dummy value and a local.toml that selects that package - undeploy Delete all deployed files from their target locations. Note that this operates on all files that are - currently in cache - watch Run continuously, watching the repository for changes and re-deploying as soon as they happen + init Initialize global.toml with a single package containing all the files in the current directory pointing to a dummy value and a local.toml that selects that package + undeploy Delete all deployed files from their target locations. Note that this operates on all files that are currently in cache + watch Run continuously, watching the repository for changes and deploying as soon as they happen. Can be ran with `--dry-run` ``` # Contributing diff --git a/src/args.rs b/src/args.rs index 25afbd0..603987c 100644 --- a/src/args.rs +++ b/src/args.rs @@ -62,7 +62,7 @@ pub enum Action { /// directory pointing to a dummy value and a local.toml that selects that package. Init, - /// Run continuously, watching the repository for changes and running a subcommand as soon as they + /// Run continuously, watching the repository for changes and deploying as soon as they /// happen. Can be ran with `--dry-run` Watch, } diff --git a/src/difference.rs b/src/difference.rs index 8119b34..7d08607 100644 --- a/src/difference.rs +++ b/src/difference.rs @@ -36,7 +36,7 @@ fn to_owned_diff_result(from: diff::Result<&str>) -> diff::Result { } } -pub fn diff_nonempty(diff: &Vec>) -> bool { +pub fn diff_nonempty(diff: &[diff::Result]) -> bool { for line in diff { match line { diff::Result::Both(..) => {} diff --git a/src/main.rs b/src/main.rs index 9430e1e..5d02102 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,7 +65,7 @@ fn run() -> Result { simplelog::TermLogger::init( if opt.quiet { - LevelFilter::Off + LevelFilter::Error } else { match opt.verbosity { 0 => LevelFilter::Warn,