dart-lang / core

This repository is home to core Dart packages.
https://pub.dev/publishers/dart.dev
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Feature request: parse complete command string to List<String> args #91

Open erlangparasu opened 1 year ago

erlangparasu commented 1 year ago

Parse complete command string to List

erlangparasu commented 1 year ago

Example

final commandParser = RawCommandParser();
List<String> args = commandParser.parse('git branch -v');
// ["git", "branch", "-v"]
jakemac53 commented 1 year ago

This is done at a higher level generally (since main takes a List<String> already). What is the use case that you have for this? There are probably a lot more edge cases than you might think, and I am not sure it's something we really want to own/maintain.

erlangparasu commented 1 year ago

my use case is for parsing complete command for example curl command