使用laravel框架如何在命令行中代码自动提示?

问题描述

如何在phpstorm的命令行中输入laravel 的php artisan 等命令,就会提示出相关的命令。
例如:我刚输入php artisan make,就会提示出后面的make:controller 或 make:job 等命令。

辛苦知道的小伙伴帮忙解答一下!

《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
最佳答案

[zsh-autosuggestion] - 输入命令时可提示自动补全 [zzsh-syntax-highlighting] - 日常用的命令会高亮显示,命令错误显示红色

插件引入配置

vim ~/.zshrc

配置项名称为 plugins 将其配置为

plugins=(git)
将其改为
plugins=(
git
zsh-autosuggestion
zsh-syntax-highlighting
)

安装 zsh-autosuggestion

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

安装 zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

最后执行命令更新配置,然后重启 iterm

source ~/.zshrc
4年前 评论
兔八哥 (楼主) 4年前
讨论数量: 16
ShiKi

这不是命令行的功能吗? iterm2配置下

4年前 评论

百度有多种方法

4年前 评论
he-tui 4年前
飞飞鱼 (作者) 4年前
JaguarJack

如果是 mbp 的话,用这个 github.com/jessarcher/zsh-artisan

4年前 评论

快捷键

按 两下 CTRL

效果

file

设置

file

4年前 评论
兔八哥 (楼主) 4年前

file

4年前 评论
Icy (作者) 4年前
兔八哥 (楼主) 4年前

搜索结果过程中发现个还不错的插件,也有智能提示的作用,上链接

fig.io/docs/getting-started

file

4年前 评论

[zsh-autosuggestion] - 输入命令时可提示自动补全 [zzsh-syntax-highlighting] - 日常用的命令会高亮显示,命令错误显示红色

插件引入配置

vim ~/.zshrc

配置项名称为 plugins 将其配置为

plugins=(git)
将其改为
plugins=(
git
zsh-autosuggestion
zsh-syntax-highlighting
)

安装 zsh-autosuggestion

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

安装 zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

最后执行命令更新配置,然后重启 iterm

source ~/.zshrc
4年前 评论
兔八哥 (楼主) 4年前
aodaobi

fish 试下

4年前 评论

有没有 win 的设置?

4年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!