With zsh, you'd use zparseoptszparseopts:
#! /bin/zsh - zmodload zsh/zutil zparseopts -A ARGUMENTS -p_out: -arg_1: p_out=$ARGUMENTS[--p_out] arg1=$ARGUMENTS[--arg_1] printf 'Argument p_out is "%s"\n' "$p_out" printf 'Argument arg_1 is "%s"\n' "$arg_1" But you'd call the script with myscript --p_out foo.
Note that zparseopts doesn't support abbreviating long options or the --p_out=foo syntax like GNU getopt(3) does.