Comments (5)
Sounds reasonable. #119 😄
from lychee.
We don't do anything fancy with --exclude
; it's just a normal structopt field:
lychee/src/bin/lychee/options.rs
Lines 159 to 162 in bfeeb28
So I'd say that's kind of the convention in structopt when you have a field that uses Vec<_>
as a type.
At least according to the POSIX standard it seems to be standard behavior:
See Guideline 10 here:
The first -- argument that is not an option-argument should be accepted as a delimiter indicating the end of options. Any following arguments should be treated as operands, even if they begin with the '-' character.
I agree that it can be counterintuitive. We can debate if we want to change it if there is a way so that structopt only takes a single argument after --exclude
. I doubt that this is possible, though and there might be good reasons for it. 😉
from lychee.
Yes as said, it's not a bug, just a syntax that is probably rarely enough used so that inexperienced users and as well higher experienced developers like me sometimes run into 😅.
Mostly I know this from X server calls and similar, where you want to pass multiple parameters to the client/child layer, followed by parameters to the server/parent layer, which then need to be delimited by --
, but indeed for multiple arguments to single options, when it's not such a multi-layer thing, at least me can't remember another case, currently.
Probably it's enough to add a line about this to readme + help output, which could be even written a way that makes clear that it is expected common syntax, so everyone who reads it get's used to it 😄:
Multiple arguments are allowed for this option, remember to use "--" to separate the list of exclusions from the list of inputs.
from lychee.
We have the same behavior for includes and headers. Would you add that note to all of these parameters in that case, add it to the lychee help output as a general note below all options, or just to the README.md
?
from lychee.
Oh, I didn't think about that. To be effective, it would make sense in the usage/--help
output of the binary itself, but not in full length below each option that supports multiple arguments.
Btw, I see now that it's already part of the usage info:
lychee [FLAGS] [OPTIONS] [--] [inputs]...
Maybe it's really just me who run into this, even overseeing this usage reminder. If at all, probably an additional sentence for the ARGS: <inputs>...
block would do, like:
Prefix with "--" to separate inputs from options that allow multiple arguments.
from lychee.
Related Issues (20)
- Update pulldown-cmark
- Support Extism WASM plugins
- Does it support scanning Vue files HOT 3
- Issues checking anchors/fragments in markdown files HOT 3
- Response chain
- Missing 0.15.x releases on docker hub HOT 1
- optionally fix document when URL are redirected HOT 6
- Converting Uri to Url string HOT 2
- Feature request: add FlareSolverr solver to bypass CloudFlare protection HOT 5
- custom Header not sent HOT 7
- Consider renaming `--format` to `--report` HOT 5
- Comments to ignore links HOT 1
- Consider renaming `fail_map` to `error_map` HOT 3
- Screencast SVG incurs a rendering burden on the browser HOT 1
- Optionally: Collect all URLs and deduplicate them? HOT 3
- Optionally: retrieve titles of pages and URL fragment targets? HOT 3
- Parameter --base does not work on windows HOT 13
- Archive integration with `lychee_lib` HOT 1
- bug: anchor/fragment detection doesn't appear to work HOT 1
- Windows Filepaths With a Drive Specifier Incorrectly Identified as Urls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lychee.