Download the PHP package bamarni/symfony-console-autocomplete without Composer

On this page you can find all versions of the php package bamarni/symfony-console-autocomplete. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package symfony-console-autocomplete

Symfony console autocomplete

GitHub CI Status GitHub Issues Build Status

PHP Version Stable Version

Total Downloads Monthly Downloads Daily Downloads Packagist Stars

Enables shell autocompletion for tools based on the Symfony Console (Symfony framework, Composer, PHPSpec, Behat, etc.)

screenshot of symfony-console-autocomplete in action: zsh autocompletion for composer (press tab two times)

Prerequisites

Installation

Install the tool globally with Composer :

composer global require bamarni/symfony-console-autocomplete

Quick setup

Add the following line at the end of your shell configuration file (~/.bash_profile or ~/.zshrc) :

eval "$(symfony-autocomplete)"

Close / re-open your terminal window and you're ready to go!

Note that quick setup only works for supported tools.

Static setup

If you don't like all the magic from the quick setup and want to go with a more standard way, you can dump a static completion file for a given tool :

symfony-autocomplete composer

This will print the completion script for Composer to stdout. The output should be saved at a specific location depending on your OS / setup. Here are a few examples :

# BASH - Ubuntu / Debian
symfony-autocomplete composer | sudo tee /etc/bash_completion.d/composer

# BASH - Mac OSX (with Homebrew "bash-completion")
symfony-autocomplete composer > $(brew --prefix)/etc/bash_completion.d/composer

# ZSH - Config file
symfony-autocomplete composer > ~/.composer_completion && echo "source ~/.composer_completion" >> ~/.zshrc

# FISH
symfony-autocomplete --shell=fish composer > ~/.config/fish/completions/composer.fish

If you are running an environment that does not have automatic execution of PHP scripts, then you will need to call PHP and the script in question :

symfony-autocomplete "php ./artisan"

General tips

Update

To update the tool to a new version use :

composer global update bamarni/symfony-console-autocomplete

Symfony framework completion

In order to get completion running, you shouldn't prepend php at the beginning of the command :

app/console [TAB]

Tips for Bash users

Alias support

By default, completion for your aliases won't be enabled. If you're using aliases (e.g. "c" for "composer", "pspec" for "phpspec", etc.), you have to pass them explicitly :

symfony-autocomplete --aliases=c --aliases=pspec

Tips for Docker users

Defining the SHELL environment variable

If you connect to your container using something similar to docker exec -it container bash then you may find that the completions cannot be built due to an inability to locate the SHELL environment variable. This has been reported in https://github.com/bamarni/symfony-console-autocomplete/issues/32

A solution is to supply the SHELL environment variable as part of the docker exec command:

docker exec -e SHELL=bash -it container bash

Supported tools

All tools using the Symfony Console component are supported.

However, quick setup only works if the entrypoint is named console or in the following list of tools:


All versions of symfony-console-autocomplete with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
ext-simplexml Version *
symfony/console Version ^2.5|^3|^4|^5|^6
symfony/process Version ^2.5|^3|^4|^5|^6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bamarni/symfony-console-autocomplete contains the following files

Loading the files please wait ....