diff options
author | Florian Pritz <f-p@gmx.at> | 2009-02-22 17:08:48 +0100 |
---|---|---|
committer | Florian Pritz <f-p@gmx.at> | 2009-02-22 17:08:48 +0100 |
commit | e5d63557c831ef737f35e596e651bda323825cf9 (patch) | |
tree | 0d1246ecf70171482e39f7aaf2db352e9a8a9fa3 /.zsh/rc | |
parent | 588814116db57cda9c41e649aa80e720f599eda1 (diff) | |
download | dotfiles-e5d63557c831ef737f35e596e651bda323825cf9.tar.gz dotfiles-e5d63557c831ef737f35e596e651bda323825cf9.tar.xz |
made password work without argument
Diffstat (limited to '.zsh/rc')
-rw-r--r-- | .zsh/rc/30functions | 7 |
1 files changed, 6 insertions, 1 deletions
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 |