make defaults configurable

This commit is contained in:
fatalerrors
2026-04-15 13:38:08 +02:00
parent 85f02f4498
commit 9a006883b8
11 changed files with 269 additions and 40 deletions

View File

@@ -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