Re: including files

Sebastian Schleussner <[email protected]> Sun, 5 May 2024 17:48:53 +0200
Newsgroups gmane.network.unison.general
Message-ID <CA+dkNVMGe-7mu_vEOxADNpp4tKSAgynE906PEw5kvDUrhPrQjQ@mail.gmail.com>
Hi

Yes, quite sure. I did experiments on it long ago (because it would have
been nice to have wildcards there) and double-checked before posting (-path
ABC, where ABC exists in one copy, finds files to sync, -path AB* doesn't).
".netscape/bookmarks.html" is no counter example because it contains no
wildcards.

"ignore = Name *" does ignore all files to begin with; "ignorenot = Name
*.prf" undoes that specifically for the files you want to include.
There is no "-include <wildcard>" syntax that implicitly excludes
everything not matching the wildcard.

As I noted, the "Name" approach works fine enough *for the simple case you
sketched*.
If several directories and files there are involved, you will want to
upgrade to the "Path" or "Regex" variants, like this:

ignore = Path *
ignorenot = Path .unison
...
ignore = Path .unison/*
ignorenot = Path .unison/*.prf


On Sun, 5 May 2024 at 17:21, Boris Kirkorowicz <[email protected]> wrote:

> Hello,
> are you sure? In the manual, I found this example:
>
> > path = .netscape/bookmarks.html
>
> If I set
>
> > ignore = Name *
>
> wouldn't it refer to all files in every path?
>
> Am 05.05.24 um 14:48 schrieb Sebastian Schleussner:
> > [Forwarding to list]
> >
> > Hi
> >
> > Notice how the usage examples for "path" in the manual never use
> > wildcards. They are not supported by that setting.
> >
> > For your task you will have to combine "ignorenot" and "ignore". In your
> > case maybe optimally in their "Name" form and together with "path" to
> > stay within that one directory.
> >
> > E.g.
> >
> > path = .unison
> > ignore = Name *
> > ignorenot = Name *.prf
> >
> >
> > Sebastian
> >
> >
> > On Sun, 5 May 2024 at 07:20, Boris Kirkorowicz <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> >     Hi,
> >     I wonder how to include certain files instead of whole directories.
> As I
> >     read in the docs, e.g.
> >
> >     path = .unison/*.prf
> >
> >     should do the job, but there are no files transferred. What should I
> do?
> >
> >
> >     --
> >     Mit freundlichem Gruß                                 Best regards
> >                                      Kirkorowicz
> >
> >     To unsubscribe from this group and stop receiving emails from it,
> >     send an email to [email protected]
> >     <mailto:unison-users%[email protected]>.
> >
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to [email protected]
> > <mailto:[email protected]>.
>
> --
> Mit freundlichem Gruß                                 Best regards
>                                  Kirkorowicz
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>
>

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].