make defaults configurable
This commit is contained in:
@@ -52,10 +52,13 @@
|
||||
# The function is very slow on Windows
|
||||
genpwd()
|
||||
{
|
||||
local length=16
|
||||
local occurs=2
|
||||
local symb=1 maj=1 min=1 numb=1
|
||||
local nbpwd=1
|
||||
local length=${GENPWD_DEFAULT_LENGTH:-16}
|
||||
local occurs=${GENPWD_DEFAULT_OCCURS:-2}
|
||||
local symb=${GENPWD_DEFAULT_SYMBOLS:-1}
|
||||
local maj=${GENPWD_DEFAULT_UPPERCASE:-1}
|
||||
local min=${GENPWD_DEFAULT_LOWERCASE:-1}
|
||||
local numb=${GENPWD_DEFAULT_NUMBERS:-1}
|
||||
local nbpwd=${GENPWD_DEFAULT_COUNT:-1}
|
||||
local extcar=""
|
||||
|
||||
local PARSED
|
||||
@@ -272,7 +275,7 @@ export -f genpwd
|
||||
# Usage: pwdscore [options] <password>
|
||||
pwdscore()
|
||||
{
|
||||
local verbose=0
|
||||
local verbose=${PWDSCORE_DEFAULT_VERBOSE:-0}
|
||||
local read_stdin=0
|
||||
local password=""
|
||||
|
||||
@@ -474,4 +477,6 @@ export -f pwdscore
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
load_conf "pwd"
|
||||
|
||||
# EOF
|
||||
|
||||
Reference in New Issue
Block a user