logo

Zsh - splitting a string into an array

Zsh - splitting a string into an array Intro There are a ton of different ways to split up a string in Zsh. This post attempts to show them with examples to help you build your own. I write Zsh scripts all the time, and still reference back to this guide, so there you go. Using the split parameter expansion ${(s/x/)foo} From the Zsh docs on Parameter Expansion Flags (yeah - I know… how would anyone ever find that if they didn’t know where to look!
3 minutes to read

zstyle primer

From my StackOverflow answer on the subject of Zstyles: When it comes to learning about the Zsh zstyle, it’s hard to find a lot of good examples that describe what zstyles are used for and how to use them. The Zsh documentation notoriously obtuse. To learn about zstyle, I recommend spending some time looking at how Prezto uses it, as well as reading the docs and trying some things in an interactive Zsh session.
3 minutes to read