mirror of
https://github.com/rfc1036/whois.git
synced 2026-01-03 06:15:17 +00:00
34 lines
548 B
Bash
34 lines
548 B
Bash
_mkpasswd() {
|
|
|
|
case $3 in
|
|
--help | --version | --salt | --rounds | --password-fd | -[hVSRP])
|
|
return 0
|
|
;;
|
|
--method | -m)
|
|
COMPREPLY=($(compgen -W '$(
|
|
LC_ALL=C "$1" --method=help 2>/dev/null |
|
|
while read -r method _; do
|
|
[[ $method == Available ]] ||
|
|
printf "%s\n" "$method"
|
|
done
|
|
)'))
|
|
return 0
|
|
;;
|
|
esac
|
|
|
|
if [[ $2 == -* ]]; then
|
|
COMPREPLY=($(compgen -W '
|
|
--method
|
|
-5
|
|
--salt
|
|
--rounds
|
|
--password-fd
|
|
--stdin
|
|
--help
|
|
--version
|
|
' -- "$2"))
|
|
return 0
|
|
fi
|
|
|
|
} && complete -F _mkpasswd mkpasswd
|