summaryrefslogtreecommitdiffstats
path: root/.zsh
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2009-02-22 17:08:48 +0100
committerFlorian Pritz <f-p@gmx.at>2009-02-22 17:08:48 +0100
commite5d63557c831ef737f35e596e651bda323825cf9 (patch)
tree0d1246ecf70171482e39f7aaf2db352e9a8a9fa3 /.zsh
parent588814116db57cda9c41e649aa80e720f599eda1 (diff)
downloaddotfiles-e5d63557c831ef737f35e596e651bda323825cf9.tar.gz
dotfiles-e5d63557c831ef737f35e596e651bda323825cf9.tar.xz
made password work without argument
Diffstat (limited to '.zsh')
-rw-r--r--.zsh/rc/30functions7
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