2 ms·
getopts is actually POSIX so all POSIX-compatible shells should have it. Looks like zsh does: https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html
by 0xbadcafebee 5y ago
getopts is actually POSIX so all POSIX-compatible shells should have it. Looks like zsh does: https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Command...
For anyone new to parsing args with getopts, a guide like this might help: https://www.shellscript.sh/tips/getopts/ https://www.shellscript.sh/tips/getopts/