From e5d63557c831ef737f35e596e651bda323825cf9 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 22 Feb 2009 17:08:48 +0100 Subject: made password work without argument --- .zsh/rc/30functions | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.zsh') diff --git a/.zsh/rc/30functions b/.zsh/rc/30functions index 5bacb00..9427bfe 100644 --- a/.zsh/rc/30functions +++ b/.zsh/rc/30functions @@ -38,7 +38,12 @@ ls () { } password () { - < /dev/urandom tr -dc A-Za-z0-9_ | head -c$1 + if [ -z "$1" ]; then + count=8 + else + count="$1" + fi + < /dev/urandom tr -dc A-Za-z0-9_ | head -c$count } # jump between directories -- cgit v1.2.3-24-g4f1b