aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-19 13:54:26 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-19 13:54:26 +1300
commitaaac7a0927481249f177a69976d30eaa3af53f97 (patch)
tree7c9e84b2e5cbb325025b4be60520081a92da00a7 /bin
parentRemove diff()/rcsdiff() function wrappers (diff)
downloaddotfiles-aaac7a0927481249f177a69976d30eaa3af53f97.tar.gz
dotfiles-aaac7a0927481249f177a69976d30eaa3af53f97.zip
Move pwgen() wrapper into pwg(1df)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pwg7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/pwg b/bin/pwg
new file mode 100755
index 00000000..219de003
--- /dev/null
+++ b/bin/pwg
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Shortcut to generate just one strong password with pwgen(1)
+# If any arguments are provided, those are used instead
+if [ "$#" -eq 0 ] ; then
+ set -- --secure -- "${PWGEN_LENGTH:-15}" "${PWGEN_COUNT:-1}"
+fi
+pwgen "$@"