summaryrefslogtreecommitdiffstats
path: root/.zsh/rc/30functions
diff options
context:
space:
mode:
Diffstat (limited to '.zsh/rc/30functions')
-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