sup-randpass/README.md

1.1 KiB

sup-randpass

A simple password generator by sup39

Usage

sup-randpass [LENGTH=36] [CHARSET...]

Charset

  • -s: space (' ')
  • -w: alphanumeric ('0'..='9', 'A'..='Z', 'a'..='z')
  • -d: numerical digits ('0'..='9')
  • -a: alphabets ('A'..='Z', 'a'..='z')
  • -u: uppercase ('A'..='Z')
  • -l: lowercase ('a'..='z')
  • --: hyphen ('-')
  • o.w.: every characters in the argument string

If no charset is specified, all ASCII printable characters (' '..='~') are used.

Examples

# generate password of length 36 containing ASCII printable characters
sup-randpass

# generate password of length 20 containing only alphanumeric characters
sup-randpass 20 -w

# generate password of length 32 containing alphanumeric characters or '+' '-' '%'
sup-randpass 20 -w +-%

Advanced Usage

Show and Copy to Clipboard in Wayland Environment

Assume you have wl-copy installed. Add the following line to your rc file:

sup-randpass() {
  command sup-randpass "$@" | tee >(wl-copy); echo
}

Source your rc file and generate password with the same command and arguments as before.