aboutsummaryrefslogtreecommitdiffstats
path: root/.config/init/funcs/rpass
blob: 9cfbc841183b1349f8330dcc06e0f6f68909146e (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 24 && printf "\n"
} | tee >(xclip -i -selection primary) | xclip -i -selection clipboard