New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command to generate Bash autocomplete script #221
Conversation
| use Symfony\Component\Console\Input\InputInterface; | ||
| use Symfony\Component\Console\Input\InputOption; | ||
| use Symfony\Component\Console\Output\OutputInterface; | ||
| use Symfony\Component\Console\Helper\DescriptorHelper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should go below line 14 right?
|
|
||
| $scriptFile = $config->get('home').DIRECTORY_SEPARATOR.self::AUTOCOMPLETE_SCRIPT; | ||
|
|
||
| $file = @file_put_contents($scriptFile, $script); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use Symfony Filesystem::dump()?
|
The inspection completed: 23 new issues, 7 updated code elements |
|
|
||
| $dump = array_map(function ($options) use ($commonOptions) { | ||
| return array_diff($options, $commonOptions); | ||
| }, $dump); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we break the line on 82 and have the closure starting on the L83 and then after the , we break again to line up $dump with the closure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that will line up L82 $dump = ... start with the closing ;
|
merging as @pierredup will send another PR covering the changes, thanks 👍 great job 😊 |
Add command to generate Bash autocomplete script
Add command to generate script for Bash autocompletion. This script allows autocomplete support when typing "gush" followed by a [tab], which gives you all the available commands, as well as the options for the commands
Sent using Gush