From eb1e05f143404312a54f0135a97225b0a17763f8 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 8 May 2014 04:55:20 +0200 Subject: inplace: mutually exclusive with force --- src/password-store.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/password-store.sh b/src/password-store.sh index a844062..a4783b4 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -230,7 +230,7 @@ cmd_usage() { overwriting existing password unless forced. $PROGRAM edit pass-name Insert a new password or edit an existing password using ${EDITOR:-vi}. - $PROGRAM generate [--no-symbols,-n] [--clip,-c] [--in-place,-i] [--force,-f] pass-name pass-length + $PROGRAM generate [--no-symbols,-n] [--clip,-c] [--in-place,-i | --force,-f] pass-name pass-length Generate a new password of pass-length with optionally no symbols. Optionally put it on the clipboard and clear board after 45 seconds. Prompt before overwriting existing password unless forced. @@ -443,7 +443,7 @@ cmd_generate() { --) shift; break ;; esac done - [[ $err -ne 0 || $# -ne 2 ]] && die "Usage: $PROGRAM $COMMAND [--no-symbols,-n] [--clip,-c] [--in-place,-i] [--force,-f] pass-name pass-length" + [[ $err -ne 0 || $# -ne 2 || ( $force -eq 1 && $inplace -eq 1 ) ]] && die "Usage: $PROGRAM $COMMAND [--no-symbols,-n] [--clip,-c] [--in-place,-i | --force,-f] pass-name pass-length" local path="$1" local length="$2" check_sneaky_paths "$path" -- cgit v1.2.3-59-g8ed1b