浏览代码

Merge pull request #2535 from IgorTimoshenko/feature/yii-plugin

Added Yii basic command completion
Robby Russell 11 年之前
父节点
当前提交
0018969b80
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. 17 0
      plugins/yii/yii.plugin.zsh

+ 17 - 0
plugins/yii/yii.plugin.zsh

@@ -0,0 +1,17 @@
+# Yii basic command completion
+
+_yii_get_command_list () {
+	protected/yiic | awk '/^ - [a-z]+/ { print $2 }'
+}
+
+_yii () {
+  if [ -f protected/yiic ]; then
+    compadd `_yii_get_command_list`
+  fi
+}
+
+compdef _yii protected/yiic
+compdef _yii yiic
+
+# Aliases
+alias yiic='protected/yiic'