#compdef passwd

_arguments -C \
  '(-l)--lock[lock USERS\'s account]' \
  '(--lock)-l[lock USERS\'s account]' \
  '(-u)--unlock[unlock USERS\'s account]' \
  '(--unlock)-u[unlock USERS\'s account]' \
  '(-S)--status[display password status for USER (locked, expired, etc.)]' \
  '(--status)-S[display password status for USER (locked, expired, etc.)]' \
  '(-i)--inactive[set NUM of days before inactive accounts are disabled (inactive accounts are those with expired passwords)]' \
  '(--inactive)-i[set NUM of days before inactive accounts are disabled (inactive accounts are those with expired passwords)]' \
  '(-n)--minage[set system minimum password age to MINDAYS]' \
  '(--minage)-n[set system minimum password age to MINDAYS]' \
  '(-x)--maxage[set system maximum password age to MAXDAYS]' \
  '(--maxage)-x[set system maximum password age to MAXDAYS]' \
  '(-L)--length[set system minimum password length to LEN]' \
  '(--length)-L[set system minimum password length to LEN]' \
  '(-h)--help[displays this message]' \
  '(--help)-h[displays this message]' \
  '(-v)--version[print version information and exit]' \
  '(--version)-v[print version information and exit]' \
  '*:user:_users'
