corrected passgen example text and default
parent
5963249c0a
commit
f1f250f7b8
|
|
@ -44,13 +44,13 @@ function passgen ()
|
||||||
about 'generates random password from dictionary words'
|
about 'generates random password from dictionary words'
|
||||||
param 'optional integer length'
|
param 'optional integer length'
|
||||||
param 'if unset, defaults to 4'
|
param 'if unset, defaults to 4'
|
||||||
example '$ pass'
|
example '$ passgen'
|
||||||
example '$ pass 6'
|
example '$ passgen 6'
|
||||||
group 'base'
|
group 'base'
|
||||||
local i pass length=${1:-4}
|
local i passgen length=${1:-4}
|
||||||
pass=$(echo $(for i in $(eval echo "{1..$length}"); do pickfrom /usr/share/dict/words; done))
|
pass=$(echo $(for i in $(eval echo "{1..$length}"); do pickfrom /usr/share/dict/words; done))
|
||||||
echo "With spaces (easier to memorize): $pass"
|
echo "With spaces (easier to memorize): $pass"
|
||||||
echo "Without (use this as the pass): $(echo $pass | tr -d ' ')"
|
echo "Without (use this as the password): $(echo $pass | tr -d ' ')"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create alias pass to passgen when pass isn't installed or
|
# Create alias pass to passgen when pass isn't installed or
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue