定制 phphleb/cli-completion 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phphleb/cli-completion

Composer 安装命令:

composer require phphleb/cli-completion

包简介

Setting up CLI autocomplete for PHP Framework HLEB2

README 文档

README

HLEB2 License: MIT

Extends CLI support for the HLEB2 framework >= v2.0.27

Install using Composer:

composer require phphleb/cli-completion

Or download the script file manually to a folder whose path you'll later specify in the initiator. In this case, you'll need to repeat the process to update the version.

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

💾 Script file /bash/hleb2bash.sh

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.

Windows

PowerShell

On Windows, the PowerShell shell is used.

💾 Script file /windows/hleb2completion.ps1

Open the user profile:

notepad $PROFILE

A file will open in Notepad. (!) If you get an error that the file was not found, create it and then open it again with the previous command:

New-Item -ItemType File -Path $PROFILE -Force

Now you need to add the path to the executable script in the opened file (specify the actual path):

. "C:\Users\user\web\hleb\vendor\phphleb\cli-completion\windows\hleb2completion.ps1"

Restart PowerShell.

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Shell

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-18