mirror of https://github.com/dswd/zvault
Changed addkey arguments
This commit is contained in:
parent
dbfd8849c4
commit
1cd58e180d
|
@ -6,3 +6,4 @@ restored
|
|||
excludes
|
||||
._*
|
||||
.~*
|
||||
docs/logo
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
This project follows [semantic versioning](http://semver.org).
|
||||
|
||||
|
||||
### UNRELEASED
|
||||
* [modifed] Changed order of arguments in `addkey` to match src-dst scheme
|
||||
* [fixed] Fixed `addkey` subcommand
|
||||
|
||||
|
||||
### v0.3.1 (2017-05-09)
|
||||
* [added] Derive key pairs from passwords
|
||||
* [modified] Added root repository to exclude list
|
||||
|
|
|
@ -3,7 +3,7 @@ zvault-addkey(1) -- Add a key pair to the repository
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
`zvault addkey [OPTIONS] <REPO> [FILE]`
|
||||
`zvault addkey [OPTIONS] [FILE] <REPO>`
|
||||
|
||||
|
||||
## DESCRIPTION
|
||||
|
@ -14,7 +14,8 @@ If `FILE` is given, the key pair is read from the file and added to the
|
|||
repository.
|
||||
|
||||
If `--generate` is set, a new key pair is generated, printed to console and
|
||||
added to the repository.
|
||||
added to the repository. If `--password` is also set, the key pair will be
|
||||
derived from the given password instead of creating a random one.
|
||||
|
||||
If `--default` is set, encryption will be enabled (if not already) and the new
|
||||
key will be set as default encryption key.
|
||||
|
@ -35,7 +36,8 @@ key will be set as default encryption key.
|
|||
* `-p`, `--password <PASSWORD>`:
|
||||
|
||||
Derive the key pair from the given password instead of randomly creating it.
|
||||
|
||||
This setting requires that `--generate` is set too.
|
||||
|
||||
|
||||
* `-h`, `--help`:
|
||||
|
||||
|
|
|
@ -405,14 +405,14 @@ pub fn parse() -> Result<(LogLevel, Arguments), ErrorCode> {
|
|||
.arg(Arg::from_usage("[FILE] 'Destination file for the keypair'")))
|
||||
.subcommand(SubCommand::with_name("addkey").about("Add a key pair to the repository")
|
||||
.arg(Arg::from_usage("-g --generate 'Generate a new key pair'")
|
||||
.conflicts_with_all(&["FILE", "PASSWORD"]))
|
||||
.conflicts_with("FILE"))
|
||||
.arg(Arg::from_usage("[set_default] --default -d 'Set the key pair as default'"))
|
||||
.arg(Arg::from_usage("-p --password [PASSWORD] 'Derive the key pair from the given password'")
|
||||
.conflicts_with("FILE"))
|
||||
.arg(Arg::from_usage("<REPO> 'Path of the repository'")
|
||||
.validator(|val| validate_repo_path(val, true, Some(false), Some(false))))
|
||||
.requires("generate"))
|
||||
.arg(Arg::from_usage("[FILE] 'File containing the keypair'")
|
||||
.validator(validate_existing_path)))
|
||||
.validator(validate_existing_path))
|
||||
.arg(Arg::from_usage("<REPO> 'Path of the repository'")
|
||||
.validator(|val| validate_repo_path(val, true, Some(false), Some(false)))))
|
||||
.subcommand(SubCommand::with_name("algotest").about("Test a specific algorithm combination")
|
||||
.arg(Arg::from_usage("[bundle_size] --bundle-size [SIZE] 'Set the target bundle size in MiB'")
|
||||
.default_value(DEFAULT_BUNDLE_SIZE_STR).validator(validate_num))
|
||||
|
|
Loading…
Reference in New Issue