diff --git a/home/.zsh-server/zshrc b/home/.zsh-server/zshrc index b123062..3e7b45d 100644 --- a/home/.zsh-server/zshrc +++ b/home/.zsh-server/zshrc @@ -29,6 +29,9 @@ alias gls=/bin/ls function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" } function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" } +function newpass() { + LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-$0} +} ### ZSH HOME export ZSH=$HOME/.zsh-server diff --git a/home/.zsh/zshrc b/home/.zsh/zshrc index 885c365..a62b213 100644 --- a/home/.zsh/zshrc +++ b/home/.zsh/zshrc @@ -37,6 +37,9 @@ alias gls=/bin/ls function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" } function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" } +function newpass() { + LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-$0} +} ### ZSH HOME export ZSH=$HOME/.zsh