aboutsummaryrefslogtreecommitdiffstats
path: root/.config/init/funcs/rpass
blob: 476d30b9bc1979342a366f27312c0e24571a3e31 (plain)
1
2
3
4
5
6
7
8
9
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 32 && printf "\n"
} | tee >(xclip -i -selection primary) | xclip -i -selection clipboard