[HN Gopher] Abuse ZSH Parameter Expansion to Expand GNU-Style Ar...
___________________________________________________________________
Abuse ZSH Parameter Expansion to Expand GNU-Style Arguments
Author : mdip
Score : 18 points
Date : 2024-10-06 15:18 UTC (7 hours ago)
(HTM) web link (matthewdippel.blogspot.com)
(TXT) w3m dump (matthewdippel.blogspot.com)
| nerdponx wrote:
| For anyone wondering what the solution is to this "solved
| problem": zparseopts, which ships with Zsh. Manual:
| https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#inde...
|
| As usual with Zsh, it can take a few hours of studying the docs
| to really make sense of it, but is well worth spending the time
| on. It's one of the reasons Zsh is actually usable for nontrivial
| scripting.
|
| Some more usage advice:
|
| https://old.reddit.com/r/zsh/comments/s09vot/using_zparseopt...
|
| https://gist.github.com/mattmc3/804a8111c4feba7d95b6d7b984f1...
|
| https://xpmo.gitlab.io/post/using-zparseopts/
___________________________________________________________________
(page generated 2024-10-06 23:01 UTC)