diff --git a/Build/mdwn2man b/Build/mdwn2man index d50c2a0111..38c0f4ba92 100755 --- a/Build/mdwn2man +++ b/Build/mdwn2man @@ -7,7 +7,7 @@ my $section=shift; print ".TH $prog $section\n"; while (<>) { - s{(\\?)\[\[([^\s\|\]]+)(\|[^\s\]]+)?\]\]}{$1 ? "[[$2]]" : $2}eg; + s{(\\?)\[\[([^:\s\|\]]+)(\|[^\s\]]+)?\]\]}{$1 ? "[[$2]]" : $2}eg; s/\`([^\`]*)\`/\\fB$1\\fP/g; s/\`//g; s/^ *\./\\&./g; diff --git a/doc/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames.mdwn b/doc/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames.mdwn index 56311bc70e..14f007292a 100644 --- a/doc/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames.mdwn +++ b/doc/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames.mdwn @@ -29,3 +29,5 @@ upgrade supported from repository versions: 0 1 2 4 The only workaround I found is to use a glob for the filepath which only works for the first space: *include='pictures/dir\*'*. [[!tag confirmed]] + +> [[fixed|done]] by documenting the `[[:space:]]` workaround. --[[Joey]] diff --git a/doc/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames/comment_4_7a8f1ba849f6e6f6072c39bdbff49405._comment b/doc/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames/comment_4_7a8f1ba849f6e6f6072c39bdbff49405._comment new file mode 100644 index 0000000000..214c1c8603 --- /dev/null +++ b/doc/bugs/preferred_content__58___include_statement_does_not_allow_spaces_in_filenames/comment_4_7a8f1ba849f6e6f6072c39bdbff49405._comment @@ -0,0 +1,13 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 4""" + date="2023-05-15T19:40:59Z" + content=""" +Thanks @aurtzy, that is a great observation! And a feature I was not +actually aware of. + +So, I think that documenting this should be sufficient. + +(The `glob(7)` man page does document POSIX character classes as working in +globs, so this is a fairly standard thing.) +"""]] diff --git a/doc/git-annex-preferred-content.mdwn b/doc/git-annex-preferred-content.mdwn index f28385dc40..e12809f556 100644 --- a/doc/git-annex-preferred-content.mdwn +++ b/doc/git-annex-preferred-content.mdwn @@ -40,6 +40,13 @@ elsewhere to allow removing it). files relative to the current directory, preferred content expressions match files relative to the top of the git repository. + A glob is something like `foo.*` or `b?r`. + Globs can also contain character classes, + like `foo[Bb]ar`, as well as additional POSIX character classes like + `[[:space:]]`. Which is useful, since a glob in a preferred content + expression cannot contain spaces. See the `glob(7)` man page for more + about globs. + For example, suppose you put files into `archive` directories when you're done with them. Then you could configure your laptop to prefer to not retain those files, like this: `exclude=*/archive/*` @@ -130,6 +137,13 @@ elsewhere to allow removing it). matches the glob. The values of metadata fields are matched case insensitively. + A glob is something like `foo.*` or `b?r`. + Globs can also contain character classes, + like `foo[Bb]ar`, as well as additional POSIX character classes like + `[[:space:]]`. Which is useful, since a glob in a preferred content + expression cannot contain spaces. See the `glob(7)` man page for more + about globs. + To match a tag "done", use `metadata=tag=done` To match author metadata, use `metadata=author=*Smith`