Stow patches
[email protected] (Jason Heiss)
| Newsgroups | gmane.comp.gnu.stow.devel |
|---|---|
| Message-ID | <[email protected]> |
I just submitted three patches for stow via Savannah and thought I ought to explain what they did. The first one is fairly obvious, it implements the use of Getopt::Long for option parsing. The second patch adds a --ignore option for ignoring certain files in the package and stow directories. --ignore can be specified multiple times on the command line to ignore more than one thing. The syntax used is similar to shell file globbing. The only metacharacters are * and ?. The third patch is actually a result of my first attempt to implement --ignore. It serves the same purpose, but instead of shell-style file globs, it takes Perl regular expressions. As such, it is much more powerful. However, the syntax is a little clumsy for simple things. So I renamed this option to --regex and started over. The --ignore and --regex patches both depend on the getopt patch. Also, either one will apply cleanly by itself; but since they touch the same bits of code you can't apply one and then the other. If anyone wants both of them, let me know and I'll redo the patches. My feeling is that --ignore is probably the one that should be implemented in the main code base, and --regex can be left as an add-on patch in case someone wants more power. Jason (A happy stow user for many years, and always surprised that something so powerful is only 500 lines of code.)