bugs/preferred content: include statement does not allow spaces in filenamesgit-annexhttp://git-annex.branchable.com/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames/git-annexikiwiki2023-05-15T20:04:39Zcomment 1http://git-annex.branchable.com/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames/comment_1_ca10638d4b4b178cfd0de8736542c4dc/joeyh.name2016-03-12T16:58:09Z2014-04-02T18:45:36Z
<p>A better workaround is:</p>
<p>include='pictures/dir?with?spaces'</p>
<p>Tokenizing text with embedded quotes is a bit of a PITA, certianly doable I suppose..</p>
comment 2http://git-annex.branchable.com/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames/comment_2_986a393a512229d35e529ba242b77b1e/ypid [wordpress.com]2016-03-12T16:58:09Z2014-04-02T21:29:54Z
<p>Thanks for your workaround ... Works for me after removing the single quote signs.</p>
<p>With this workaround on hand one could include/match any filename. Works for me <img src="http://git-annex.branchable.com/smileys/smile4.png" alt=";)" /></p>
comment 3http://git-annex.branchable.com/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames/comment_3_a66be1cc2c4ca7e470be1248dcbbe885/aurtzy2023-05-14T02:52:38Z2023-05-14T02:52:38Z
Encountered this issue the other day, and just wanted to mention a more explicit alternative: it looks like matchexpression file globs support POSIX character classes, so one could also use "[[:blank:]]" which matches a space or tab.
comment 4http://git-annex.branchable.com/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames/comment_4_7a8f1ba849f6e6f6072c39bdbff49405/joey2023-05-15T20:04:39Z2023-05-15T19:40:59Z
<p>Thanks @aurtzy, that is a great observation! And a feature I was not
actually aware of.</p>
<p>So, I think that documenting this should be sufficient.</p>
<p>(The <code>glob(7)</code> man page does document POSIX character classes as working in
globs, so this is a fairly standard thing.)</p>