1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Pass Arguments to zsh Functions with zparseopts

    bashBash

    Parsing arguments in zsh functions can be a bit difficult to manage if you try and customize it for each new function. Luckily, that's where zparseopts comes in. zparseopts is a utility function which can parse out each of the arguments you define and store them inside of an associative array for easy access. This makes accessing arguments as easy as looking them up by name.