Bash 补全 symfony

发布于 2024-08-25 15:19:59 字数 255 浏览 3 评论 0原文

如何在 bash 中完成 symfony 补全? 有ubuntu 9.10。编写自己的别名很困难。有人知道我在哪里可以找到它吗?

我发现 http://trac.symfony-project.org/wiki/BashCompletion -但它适用于 symfony 1.1。与1.4兼容吗?

How can I make symfony completion in bash?
Have ubuntu 9.10. It's hard to write own alias. Anyone know where can I find it?

I find http://trac.symfony-project.org/wiki/BashCompletion - but it is for symfony 1.1. Is it compatible with 1.4 ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

静若繁花 2024-09-01 15:19:59

http://github.com/biko2/symfony_complete

该脚本非常适合 symfony 1.4。

http://github.com/biko2/symfony_complete

This script works great for symfony 1.4.

夜血缘 2024-09-01 15:19:59

我不确定该代码是否适用于 1.4,因为我不使用 propel,而是使用 symfony 的 ORM 学说。然而,真的有必要再这样做吗? symfony 任务能够计算出您的意思,如果它是最独特的表达式形式,就像补全一样,例如:

./symfony do:build --all --and-load --no-confirmation

我还发现,如果您经常使用上面的脚本,那么将它们放入自己的脚本中是很有用的bash 脚本在路径中,这样您就可以使用代码完成来调用它们,

#!/bin/bash
./symfony doctrine:build --all --and-load --no-confirmation

然后将其保存在路径中,例如 /usr/local/sbin ,如 symfony-build 然后设置它作为可执行文件 chmod +x /usr/local/sbin/symfony-build ,然后您可以通过输入 symfony-[TAB] 来调用它,它应该为您完成代码(虽然不一定是你想要的)。

I am not sure if that code will work with 1.4 because I do not use propel but use the doctrine ORM with symfony. However is there a real need to do this any more? The symfony task is capable of working out what you meant if it is the most unique form of the expression much like completion would work, for example:

./symfony do:build --all --and-load --no-confirmation

I also find it useful to put scripts like the above if you use them a lot into their own bash scripts in the path so you can call them with code completion i.e.

#!/bin/bash
./symfony doctrine:build --all --and-load --no-confirmation

and then save it in the path e.g. /usr/local/sbin as something like symfony-build then set it as execucutable chmod +x /usr/local/sbin/symfony-build then you may call it by typing symfony-[TAB] and it should code complete for you (though not necessarily how you wanted).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文