Open anoopjohn opened 5 years ago
I have installed
$ composer require stecman/symfony-console-completion
I also have bash-completion installed in the system.
I was trying to debug this further
When I run the command inside a Drupal folder I get
$ drupal _completion -g -p drupal
Error: Call to undefined method Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand::isMaintenance() in /home/anoopjohn/public_html/drupal/d8/vendor/drupal/console-core/src/EventSubscriber/MaintenanceModeListener.php on line 80 #0 /home/anoopjohn/public_html/drupal/d8/vendor/drupal/console-core/src/EventSubscriber/MaintenanceModeListener.php(66): Drupal\Console\Core\EventSubscriber\MaintenanceModeListener->switchMaintenanceMode(Object(Symfony\Component\Console\Event\ConsoleTerminateEvent), 'off')
#1 /home/anoopjohn/public_html/drupal/d8/vendor/symfony/event-dispatcher/EventDispatcher.php(214): Drupal\Console\Core\EventSubscriber\MaintenanceModeListener->disableMaintenanceMode(Object(Symfony\Component\Console\Event\ConsoleTerminateEvent), 'console.termina...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 /home/anoopjohn/public_html/drupal/d8/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'console.termina...', Object(Symfony\Component\Console\Event\ConsoleTerminateEvent))
#3 /home/anoopjohn/public_html/drupal/d8/vendor/symfony/console/Application.php(1008): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('console.termina...', Object(Symfony\Component\Console\Event\ConsoleTerminateEvent))
#4 /home/anoopjohn/public_html/drupal/d8/vendor/symfony/console/Application.php(254): Symfony\Component\Console\Application->doRunCommand(Object(Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /home/anoopjohn/public_html/drupal/d8/vendor/drupal/console-core/src/Application.php(188): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /home/anoopjohn/public_html/drupal/d8/vendor/drupal/console/src/Application.php(64): Drupal\Console\Core\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /home/anoopjohn/public_html/drupal/d8/vendor/symfony/console/Application.php(147): Drupal\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /home/anoopjohn/public_html/drupal/d8/vendor/drupal/console/bin/drupal.php(89): Symfony\Component\Console\Application->run()
#9 /home/anoopjohn/public_html/drupal/d8/vendor/drupal/console/bin/drupal(4): require('/home/anoopjohn...')
#10 {main}
Error: Call to undefined method Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand::isMaintenance() in Drupal\Console\Core\EventSubscriber\MaintenanceModeListener->switchMaintenanceMode() (line 80 of /home/anoopjohn/public_html/drupal/d8/vendor/drupal/console-core/src/EventSubscriber/MaintenanceModeListener.php).
When I run it outside the Drupal folder I get
$ drupal _completion -g -p drupal
The "--learning" option does not exist.
_completion [-g|--generate-hook] [-p|--program PROGRAM] [-m|--multiple] [--shell-type [SHELL-TYPE]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--] <command>
[standard] Autocomplete not working in bash in Ubuntu 19.04
Problem/Motivation
I tried to enable autocomplete on bash in Ubuntu 19.04. I was not able to get it working out of the box.
Also per the documentation in README.md the package http://bash-completion.alioth.debian.org/ is required. However this URL is not valid.
How to reproduce
I followed the instructions for installation as per the README.md and as per the messages in the install process.
More info
While sourcing console.rc separately I get this as well. Not sure if it is related
Solution
Will need to find and fix the issue.
Documentation Fixes
Looks like there has to be some fixes in the documentation as well. https://salsa.debian.org/debian/bash-completion seems to be the URL for the bash-completion project.