stecman / symfony-console-completion

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

Set default for "_completion --generate-hook -p" command #45

Closed aik099 closed 8 years ago

aik099 commented 9 years ago

Currently the -p option is optional which results in completion hook generation, that would only work when absolute path to an app (for which to receive completions) is specified.

I haven't seen a case, where this is needed. Instead I recommend setting default value for -p option to be basename(script). This would simplify hook generation command for these use cases.

aik099 commented 9 years ago

@stecman , ping.

stecman commented 9 years ago

Yeah I think this makes sense. I had initially implemented this using absolute paths, so adding the -p option was initially a way to support programs run through aliases in BASH, but it looks like the more common thing with completions is to just specify the program's basename as you're suggesting (looking at the scripts in the bash-completion package anyway).

aik099 commented 8 years ago

PR created, ready for review.