From bb88edcb0cbc6d10cadd37bde6833e79c7cab531 Mon Sep 17 00:00:00 2001 From: katherine Date: Wed, 9 Sep 2020 10:03:57 -0700 Subject: add rpass func --- .config/init/funcs/rpass | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 .config/init/funcs/rpass (limited to '.config/init/funcs') diff --git a/.config/init/funcs/rpass b/.config/init/funcs/rpass new file mode 100755 index 0000000..9cfbc84 --- /dev/null +++ b/.config/init/funcs/rpass @@ -0,0 +1,10 @@ +#!/usr/bin/env zsh +# generate random passwords + +unsetopt MULTIBYTE + +{ + cat /dev/random | while read -u0 -k1 c; do + [[ $c =~ '^[a-zA-Z0-9]$' ]] && printf $c + done | head -c 24 && printf "\n" +} | tee >(xclip -i -selection primary) | xclip -i -selection clipboard -- cgit v1.2.3