Ryan is back for the next installment of CraftQuest Casual. He builds on a recent video on extending DDEV using a custom command.
This command will be called lp (for “launch project”) and launch multiple URLS at once. For our usage, this will mean launching both the CP and front-end of the site. That’ll be nice!
A lot of it is similar to what I built in the video on DDEV custom commands but with one twist: we need to have an array of URLs to iterate over and then launch each URL in the array.
When we loop over the URLS, we see this syntax: "${URLS[@]}"
This is an array expansion syntax in Shell Script where:
URLS is the name of an array variable we set earlier in the script,[@] is an array subscript that means “expand to all elements of the array”,${...} syntax is used for parameter expansion,"..." around the expansion prevent word splitting and preserve spaces in array elements.Follow along with the full transcript
Search every word, click any line to jump to that moment, and read along as you watch — a CraftQuest Premium feature.
Sign up for PremiumSome stuff to help you along during the lesson: