kevmoo / completion.dart

A packaged to add shell command completion to your application
https://pub.dev/packages/completion
BSD 3-Clause "New" or "Revised" License
60 stars 11 forks source link

Add instructions, export tryCompletion #3

Closed gspencergoog closed 6 years ago

gspencergoog commented 6 years ago

Hi Kevin,

In using this, I realized that it would be more convenient for my usage if I could have direct access to tryCompletion instead of having tryArgsCompletion call argParser.parse itself, since that means I have to override parse in the CommandRunner in the args package in order to inject the completion code.

I removed some returns when it fails to get a script name in tryCompletion, since that's only used for log output, and it prevents testing that completion actually works in Flutter's test environment (the script name is a data URL in that case).

I also added some instructions to the readme, since that seems like it would help people use this. Hopefully they're close... :-)

gspencergoog commented 6 years ago

OK, done.

kevmoo commented 6 years ago

Thanks, @gspencergoog ! Will merge when travis is green

kevmoo commented 6 years ago

@gspencergoog – published in 0.2.1

gspencergoog commented 6 years ago

Thanks!