aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2018-11-27 02:18:18 -0700
committerkatherine <shmibs@shmibbles.me>2018-11-27 02:18:18 -0700
commitcdec2892d55031d870b3402dc810e20592689686 (patch)
treed03abebebb3e7d9802fcf3bcc2ebbd39cf263c6d
parent7dee2a8d748d3f41d6c5104170bf109a1b5ab505 (diff)
downloaddotfiles-cdec2892d55031d870b3402dc810e20592689686.tar.gz
add function for easier pass gen
-rw-r--r--.zshrc10
1 files changed, 9 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index 032a438..1f6971c 100644
--- a/.zshrc
+++ b/.zshrc
@@ -172,7 +172,7 @@ fi
################## FUNCTIONS ##################
-# ignore non-tracked files
+# ignore non-tracked files && keep submods current
if [[ ! -z $(whence git) ]] then
git() {
case $1 in
@@ -183,6 +183,14 @@ git() {
}
fi
+# password generation
+if [[ ! -z $(whence pwgen) ]] then
+pwgen() {
+ [[ ${#@} -eq 0 ]] && $(whence -p pwgen) -snc 20 1 && return 0
+ $(whence -p pwgen) -snc $@ 1
+}
+fi
+
################# OS SPECIFIC #################
case $(uname) in