Comments (4)
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent
Marked this as blocking dart-lang/sdk#7489.
from args.
<img src="https://avatars.githubusercontent.com/u/103167?v=3" align="left" width="48" height="48"hspace="10"> Comment by srawlins
I think it would be crazy unexpected if on a non-Windows system, args parsed arguments starting with a / as an option. IE:
my_dart_script --foo=bar /baz
If my_dart_script happens to also have an option "--baz" defined, it should not read "/baz" as an option! I suggest using Platform.isWindows for this feature. This is still a little wonky, however, because then Window folks would still be able to supply options with -- and with /, so the above example is just as confusing, but only for Windows folks.
from args.
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent
Yeah, I don't think we should support any of this on non-Windows platforms. Platform.isWindows is probably the right approach, but note that that's a breaking change for args. Currently, it doesn't import anything except "dart:io" and it can be used outside of the standalone VM.
from args.
Uri.base
can be used now to determine the operating system without importing dart:io
.
from args.
Related Issues (20)
- Add a CommandRunner example HOT 2
- Why is `CommandRunner._usageWithoutDescription` private?
- Promote Command.argResults to be non-nullable HOT 1
- Make allowed options case insensitive
- How to add default command?
- Provide the function to print strings in nice columns
- Standards used in docopt. HOT 2
- [Feature request] Show command alias in usage HOT 3
- Command CommandRunner Platform.executableArguments HOT 3
- use of 'mandatory' options breaks handling of the help flag
- Feature request: parse complete command string to List<String> args HOT 3
- Analogue of '::' GNU getopt extension? HOT 1
- `--` needs to be escaped on Windows HOT 2
- Usage should be able to show additional info for trailing options (rest)
- Setting the mandatory parameter of the addOption function to true has no effect. HOT 1
- `takesArguments` should change the usage text
- Incorrect message in `dart_site --help` HOT 1
- remove nullability from `ArgParser.addFlag({bool? defaultsTo = false})`
- default branch renamed from `master` to `main`
- Allow `multiOption` to be mandatory
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 args.