diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-10 13:31:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-10 13:31:03 +1200 |
commit | 835a273f0a708b5ef8c59e299b034c78b045d936 (patch) | |
tree | 95ca4e81eeb9571a301fa91c5af07940710f6739 /pdksh/pdkshrc.d/pwgen.pdksh | |
parent | Merge branch 'master' into openbsd (diff) | |
download | dotfiles-835a273f0a708b5ef8c59e299b034c78b045d936.tar.gz dotfiles-835a273f0a708b5ef8c59e299b034c78b045d936.zip |
Port easy bashrc.d scripts to pdkshrc.d
Have left out anything that requires non-trivial fixes, mostly due to
variable scope or missing features.
Diffstat (limited to 'pdksh/pdkshrc.d/pwgen.pdksh')
-rw-r--r-- | pdksh/pdkshrc.d/pwgen.pdksh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pdksh/pdkshrc.d/pwgen.pdksh b/pdksh/pdkshrc.d/pwgen.pdksh new file mode 100644 index 00000000..7ba056e5 --- /dev/null +++ b/pdksh/pdkshrc.d/pwgen.pdksh @@ -0,0 +1,8 @@ +# Set some defaults for pwgen(1), because its defaults are to give me a long +# list of relatively short passwords, when I generally want only one good one +pwgen() { + if ! (($#)) ; then + set -- --secure -- "${PWGEN_LENGTH:-15}" "${PWGEN_COUNT:-1}" + fi + command pwgen "$@" +} |