Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: pwgen completion
- X-seq: zsh-workers 42548
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: pwgen completion
- Date: Tue, 27 Mar 2018 23:46:27 +0200
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1522198866; bh=+3qJeFl+5wXvW5zLvtilggq+kHY50AAJF33UolMIBWQ=; h=From:To:Subject:Date:From:Subject; b=cGFVKNM5gck4KnZ1kKN2ikFY8ESp8+WEvYNZ4A98vD0ljmC+eEd8k/XCiuNouz+viglmBN1+WH1S50ds3+z8wZcSPldtLFc959Cx6ultLnSLk8wPu9stUQVjioHQLroZEYUM9OYLl6xFTxw/dlkOjZOrksyPZtgthpdHP2G0VG37dfmP77yI9L7NfyNeeHlsIV4dHotW/WlDUOHDAXwhwyEhPu/TTUjNrCY/oiyNynVMlSre6Zrkzyz5WQzX9KKSPwRwhjOpAX5B9TlyN88bM1VyNfeRV/gY+gCW8XPIbAv+k/psXan/1x5KT13HgnPNd0wrBLp2SJsR0q7WuNrW2g==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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"'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author