From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: pwgen completion
Date: Tue, 27 Mar 2018 23:46:27 +0200 [thread overview]
Message-ID: <7437.1522187187@thecus> (raw)
New completion for pwgen, a utility for generating random passwords.
Oliver
diff --git a/Completion/Unix/Command/_pwgen b/Completion/Unix/Command/_pwgen
new file mode 100644
index 000000000..f8ab1cb92
--- /dev/null
+++ b/Completion/Unix/Command/_pwgen
@@ -0,0 +1,19 @@
+#compdef pwgen
+
+_arguments -s -S \
+ '(-h --help -c --capitalize -A --no-capitalize)'{-c,--capitalize}'[include at least one capital letter in the password]' \
+ '(-h --help -c --capitalize -A --no-capitalize)'{-A,--no-capitalize}"[don't include capital letters in the password]" \
+ '(-h --help -n --numerals -0 --no-numerals)'{-n,--numerals}'[include at least one number in the password]' \
+ '(-h --help -n --numerals -0 --no-numerals)'{-0,--no-numerals}"[don't include numbers in the password]" \
+ '(-h --help -y --symbols)'{-y,--symbols}'[include at least one special symbol in the password]' \
+ '(-h --help -r --remove-chars)'{-r+,--remove-chars=}'[remove characters from the set of characters to generate passwords]:characters' \
+ '(-h --help -s --secure)'{-s,--secure}'[generate completely random passwords]' \
+ '(-h --help -B --ambiguous)'{-B,--ambiguous}"[don't include ambiguous characters in the password]" \
+ '(- 1 2)'{-h,--help}'[print a help message]' \
+ '(-h --help -H --sha1)'{-H+,--sha1=}'[use sha1 hash of given file as a (not so) random generator]:file:_files -S \# -qr "/ \t\n\-"' \
+ '(-h --help -1)-C[print the generated passwords in columns]' \
+ "(-h --help -C)-1[don't print the generated passwords in columns]" \
+ '(-h --help -v --no-vowels)'{-v,--no-vowels}"[don't use any vowels so as to avoid accidental nasty words]" \
+ '(-N --num-passwords 2)'{-N,--num-passwords}'[specify number of passwords to generate]' \
+ '!-a' '!--alt-phonics' \
+ '1: :_guard "^-*" "length"' '(-N --num-passwords)2: :_guard "^-*" "number of passwords"'
reply other threads:[~2018-03-28 1:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7437.1522187187@thecus \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).