Error in documentation
Sam Lunt <[email protected]> Mon, 17 Sep 2018 10:30:37 -0500
| Newsgroups | gmane.comp.gnu.stow.bugs |
|---|---|
| Message-ID | <CADjN2kda1M_5yeqzK99uvjFnLJVbqqtF1n-pTwyOhYzPk1_WjQ@mail.gmail.com> |
In the manual on resource files (https://www.gnu.org/software/stow/manual/stow.html#Resource-Files), the examples are incorrect. They show directories surrounded with single quotes, but that leads to incorrect regexes. The shell will automatically remove the quotes. They are required when the path contains spaces and optional otherwise. However, no shell escaping is applied to entries in the stowrc file; each line is copied verbatim to an entry in ARGV. Therefore, the quotes remain. So for example, the documentation shows a hypothetical file with entry: --ignore='\.bs' if this is passed in via the shell, the quotes are removed, but if this is included in a .stowrc file, the quotes remain, so the above stowrc line is equivalent to the command line argument --ignore=\'\.bs\'. This tripped me up for a while, so I figured someone else might have the same problem. Also, there's no issue with including a filename with spaces in the stowrc file, since they are delimited by new lines, not spaces.