diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:11:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:11:53 +0000 |
commit | 655cb1b8222b0a587bbdd5c1357d55682332c665 (patch) | |
tree | 65a83d3c36e6d4c4d57cec63f63d2019b2dfc93b /mkpasswd.bash | |
parent | Initial commit. (diff) | |
download | whois-655cb1b8222b0a587bbdd5c1357d55682332c665.tar.xz whois-655cb1b8222b0a587bbdd5c1357d55682332c665.zip |
Adding upstream version 5.5.21.upstream/5.5.21
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mkpasswd.bash')
-rw-r--r-- | mkpasswd.bash | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mkpasswd.bash b/mkpasswd.bash new file mode 100644 index 0000000..2d0b9a6 --- /dev/null +++ b/mkpasswd.bash @@ -0,0 +1,33 @@ +_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 |