phphleb / cli-completion
Setting up CLI autocomplete for PHP Framework HLEB2
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Shell
Requires
- php: >=8.2.0
- phphleb/framework: >=2.0.27
This package is auto-updated.
Last update: 2024-12-19 13:47:31 UTC
README
Extends CLI support for the HLEB2 framework >= v2.0.27
Install using Composer:
composer require phphleb/cli-completion
After installation, auto-completion of console commands (
php console
) by pressing Tab will substitute suitable framework commands.
If you have several projects based on the HLEB2 framework, then copy the library files to the user's root folder and specify the path there.
Bash
Linux
For Linux, in a terminal running Bash, add the following line to the ~/.bashrc file. For instance, if the library is installed in a project located at /home/user/web/hleb/, add the following:
source /home/user/web/hleb/vendor/phphleb/cli-completion/bash/hleb2bash.sh
After adding, restart the terminal or run source ~/.bashrc to apply the changes. Autocompletion will work for all projects based on the HLEB2 framework.
macOS
On macOS, the process is similar. You need to add the line to the ~/.bash_profile or ~/.bashrc file, depending on your terminal setup. For example:
source /Users/user/web/hleb/vendor/phphleb/cli-completion/bash/hleb2bash.sh
Afterward, restart the terminal or run source ~/.bash_profile or source ~/.bashrc to apply the changes. Autocompletion will be available for all HLEB2-based projects.