Skip to content

Instantly share code, notes, and snippets.

@mlegls
Last active January 19, 2023 21:46
Show Gist options
  • Save mlegls/7df9abf5e935e0979a7cad7c744285fa to your computer and use it in GitHub Desktop.
Save mlegls/7df9abf5e935e0979a7cad7c744285fa to your computer and use it in GitHub Desktop.
\d cli
(あ):{$[1~x;`$'x_y;`$x_y]}
p1:{ /parse 1
ta:"-"~*t:*|x; ha:"-"~*h:*x
d:{[x;h;t;ta]$[ta;(xあh)!1;(xあh)!`$t]}[;h;t;ta]
:$["--"~2#h;d 2;ha;d 1;ha|ta;`!`;(`$t)!`]
}
p:{x,y}/2p1': /parse all
a:{(^:)_(!l)[&^.l:p x]} /args
f:{(p x)_/`,a x} /flags
\d .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment