summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2018-03-28 10:32:11 +0200
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-03-28 10:32:11 +0200
commitde7c06a3dffc6e339354e461b833bfc92cd10300 (patch)
treed21291c51a242c96b829a8d10668ae8597e9e46f
parentc2c9a163509bd36d15239b21b9c553eeba23f986 (diff)
downloadzsh-de7c06a3dffc6e339354e461b833bfc92cd10300.tar.gz
zsh-de7c06a3dffc6e339354e461b833bfc92cd10300.tar.xz
zsh-de7c06a3dffc6e339354e461b833bfc92cd10300.zip
42548: new pwgen completion
-rw-r--r--ChangeLog2
-rw-r--r--Completion/Unix/Command/_pwgen19
2 files changed, 21 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 72fc778ce..ebf8291ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2018-03-28  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
+	* 42548: Completion/Unix/Command/_pwgen: new pwgen completion
+
 	* 42549: Completion/Redhat/Command/_yum: also handle the yumdb
 	command in yum completion
 
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"'