I am looking for a way to build a list of files by parsing a file that contains a sequence of
zsh globbing patterns.
The final goal is to pass this list of files to
hg add in mercurial. For those interested in this specific part, my question is motived by this other question that I asked in StackOverflow:
A sample file (let's call it
.hginclude) would look as follows:
.zshrc .zprofile .less* .emacs*/** src*/** .hg* .bash* .inputrc .ssh
and the output from the script should be a list of files obtained by collecting the output of
on every line, where
globbing_pattern refers to each line in the file
Ultimately, the list of files should be a list that I can pass to
hg add to track those files in mercurial.
The assumption for this part is that I have an
.hgignore with the following:
syntax: glob *
which means: don't track anything unless explicitly added via an
hg add command.