diff --git a/README.md b/README.md index 038e377..0e2577c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,16 @@ # passphrase -A simple bash script that generates random dictionary-derived passwords for me. It takes a single parameter, which is the number of phrase groups to output. +A simple bash script that generates random dictionary-derived passwords for me. It takes two arguments: + + **-c** <*number*> + Provides this many groups of five passphrases. + + **-s** + Include spaces between all words. Here's an example. Feel free to mix and match and use these as passwords. They would be good passwords. I'm not using any of them. I swear. -``` -$ passphrase 5 +```shell +$ passphrase -c 5 -s tree eardrum format yachts guerilla sheepdog diff --git a/passphrase b/passphrase index 5347248..2493c54 100755 --- a/passphrase +++ b/passphrase @@ -15,13 +15,13 @@ while [[ $# > 0 ]]; do # iterate through arguments, one or two steps at a time key="$1" # argument key case $key in - -s|--space) # we want spaces b/w words + -s) # we want spaces b/w words SPACE=1 # since this option takes no value argument, we only want # to shift ahead one argument ;; - -c|--count) # we want a certain number of groups + -c) # we want a certain number of groups COUNT="$2" # and since this does have a value, skip the value itself on # the next scan... we know it's not an argument key