stecman / symfony-console-completion

Automatic tab-key completion for Symfony console application options, arguments and parameters
MIT License
420 stars 26 forks source link

Rewrite command-line splitting to tokenize quoted strings #82

Closed stecman closed 5 years ago

stecman commented 6 years ago

This replaces the previous simple "split on breaks" regex in CompletionContext::splitCommand() with a function that behaves as a tokenizer and uses a more complete regex.

This adds support for completion of:

To do:

Resolves #67

stecman commented 5 years ago

Under BASH and ZSH this now looks like this:

peek 2019-01-07 15-40

Still needs a little tweaking to make BASH escape quotes inside completions, but otherwise should be ready. Feel free to test this.

stecman commented 5 years ago

@JoshuaBehrens, @aik099 this is ready to merge now if you want to test/review.

JoshuaBehrens commented 5 years ago

@stecman you are a man of honor. I will test as soon as possible. If it works out this change can be part of the almost dusty PR :+1:

JoshuaBehrens commented 5 years ago

Merge it and release a new version :+1: Very good work

I had no problems anymore with whitespace or special chars I am used to work with.

JoshuaBehrens commented 5 years ago

Thanks for creating a new minor version. Apparently packagist is not yet aware of it :disappointed:

stecman commented 5 years ago

Aha, the Packagist hook just needed updating - published now :+1: