Create a gist now

Instantly share code, notes, and snippets.

@hkoba /glob.c
Last active Feb 10, 2016

What would you like to do?
I guess this is the origin of recursive glob, found in Zsh 1.0 source code, found in alt.sources archive.
/*
* See https://groups.google.com/d/msg/alt.sources.d/uJlYosi0fjQ/O1Yct30R3mAJ
* And https://groups.google.com/forum/#!msg/alt.sources/tVgN49u8Ax4/7VgQlHZ4bJMJ
*/
qath parseqath(void)
{
comp c1;
qath p1;
if (pptr[0] == '.' && pptr[1] == '.' && pptr[2] == '.' && pptr[3] ==
'.' && pptr[4] == '/')
{
pptr[0] = Inpar;
pptr[1] = Star;
pptr[2] = '/';
pptr[3] = Outpar;
pptr[4] = Pound; /* "..../" -> "( * /)#" */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment