Get support for KnpLabs/KnpConsoleAutocompleteBundle
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
KnpLabs/KnpConsoleAutocompleteBundle
THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs
Contact us if you want to be the official maintainer of this Bundle
ConsoleAutocompleteBundle
This bundle provides a simple way of autocompleting your commands in your shell.
Installation
Installation is a quick (I promise!) 4 step process:
- Download KnpConsoleAutocompleteBundle
- Configure the Autoloader
- Enable the Bundle
- Add profile shortcut
Step 1: Download KnpConsoleAutocompleteBundle
Ultimately, the KnpConsoleAutocompleteBundle files should be downloaded to the
vendor/bundles/Knp/Bundle/ConsoleAutocompleteBundle
directory.
This can be done in several ways, depending on your preference. The first method is the standard Symfony2 method.
Using the vendors script
Add the following lines in your deps
file:
[KnpConsoleAutocompleteBundle]
git=https://github.com/KnpLabs/KnpConsoleAutocompleteBundle.git
target=/bundles/Knp/Bundle/ConsoleAutocompleteBundle
Now, run the vendors script to download the bundle:
$ php bin/vendors install
Using submodules
If you prefer instead to use git submodules, then run the following:
$ git submodule add git://github.com/KnpLabs/KnpConsoleAutocompleteBundle.git vendor/bundles/Knp/Bundle/ConsoleAutocompleteBundle
$ git submodule update --init
Step 2: Configure the Autoloader
Add the Knp
namespace to your autoloader:
<?php
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'Knp' => __DIR__.'/../vendor/bundles',
));
Step 3: Enable the bundle
Finally, enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Knp\Bundle\ConsoleAutocompleteBundle\KnpConsoleAutocompleteBundle(),
);
}
Step 4: Add profile shortcut
The first time you install KnpConsoleAutocompleteBundle
in a project, you should add Resources/Shells/symfony2-completion.bash
in your bash profile (in ~/.bash_profile
on MacOS and ~/.bashrc
on Ubuntu Debian or other linux):
source /path-to-symfony2-completion.bash
Usage
That's it! Now when you type:
./app/console doc[TAB]
, you should see an autocompletion of the command name.
./app/console doctrine:fixtures:load --[TAB]
, you should see an autocompletion of the option names.
Valid executable names are:
-
console
-
Symfony
Troubleshooting
If none of these names do it for you, you can enable completion for your own executable. Add this line to your bash profile, just below where you sourced symfony2-completion.bash
:
complete -F _console my-console-name
Copyright & Credits
KnpConsoleAutocompleteBundle Copyright (c) 2011 KnpLabs.
See LICENSE for details.
Contributors:
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2