TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Abuse ZSH Parameter Expansion to Expand GNU-Style Arguments

26 pointsby mdip7 months ago

1 comment

nerdponx7 months ago
For anyone wondering what the solution is to this &quot;solved problem&quot;: zparseopts, which ships with Zsh. Manual: <a href="https:&#x2F;&#x2F;zsh.sourceforge.io&#x2F;Doc&#x2F;Release&#x2F;Zsh-Modules.html#index-zparseopts" rel="nofollow">https:&#x2F;&#x2F;zsh.sourceforge.io&#x2F;Doc&#x2F;Release&#x2F;Zsh-Modules.html#inde...</a><p>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&#x27;s one of the reasons Zsh is actually usable for nontrivial scripting.<p>Some more usage advice:<p><a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;zsh&#x2F;comments&#x2F;s09vot&#x2F;using_zparseopts&#x2F;?rdt=46206" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;zsh&#x2F;comments&#x2F;s09vot&#x2F;using_zparseopt...</a><p><a href="https:&#x2F;&#x2F;gist.github.com&#x2F;mattmc3&#x2F;804a8111c4feba7d95b6d7b984f12a53" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;mattmc3&#x2F;804a8111c4feba7d95b6d7b984f1...</a><p><a href="https:&#x2F;&#x2F;xpmo.gitlab.io&#x2F;post&#x2F;using-zparseopts&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xpmo.gitlab.io&#x2F;post&#x2F;using-zparseopts&#x2F;</a>
评论 #41762539 未加载