From cdec2892d55031d870b3402dc810e20592689686 Mon Sep 17 00:00:00 2001 From: katherine Date: Tue, 27 Nov 2018 02:18:18 -0700 Subject: add function for easier pass gen --- .zshrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to '.zshrc') 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 -- cgit v1.2.3