wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wget-dev] wget2 | Implementation of -I/-X options (!383)


From: Tim Rühsen
Subject: Re: [Wget-dev] wget2 | Implementation of -I/-X options (!383)
Date: Sat, 18 Aug 2018 08:50:21 +0000

The original behavior is limited in what you can specify with -I and -X.

We decided to make it more powerful, when we read -X / -I from left to right 
(same as your implementation checking from right to left and stop at the first 
match).

So we can have exceptions and exceptions from exceptions, etc...

Your example:
```
--exclude-directories=/firstdir --include-directories=/*,/*/pub
```
It reads "Download all, but no stuff from /firstdir except stuff from 
/firstdir/pub".

Turning it around:
```
 --include-directories=/*,/*/pub --exclude-directories=/firstdir
```
It reads "Just download from / (which means ALL and already includes /*/pub) 
except stuff from /firstdir"

So to also download stuff from /firstdir/pub, it must be
```
 --include-directories=/* --exclude-directories=/firstdir 
--include-directories=/firstdir/pub
```

You can leave away the first `--include-directories=/*` to get the same result.

IMO this is logical, easy to memorize, powerful and easy to explain.

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/merge_requests/383#note_95251149
You're receiving this email because of your account on gitlab.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]