354593e9b2b3a7ec3a0840eeadbc7d760cdd7263
- Author
- Igor Timoshenko <igor.timoshenko@i.ua>
- Committer
- Igor Timoshenko <igor.timoshenko@i.ua>
- Date
Message
Added Yii basic command completion
Diff
1diff --git a/plugins/yii/yii.plugin.zsh b/plugins/yii/yii.plugin.zsh
2new file mode 100644
3index 0000000000000000000000000000000000000000..b816160f01d93036db2a2411bf13cd63e5b18f09
4--- /dev/null
5+++ b/plugins/yii/yii.plugin.zsh
6@@ -0,0 +1,17 @@
7+# Yii basic command completion
8+
9+_yii_get_command_list () {
10+ protected/yiic | awk '/^ - [a-z]+/ { print $2 }'
11+}
12+
13+_yii () {
14+ if [ -f protected/yiic ]; then
15+ compadd `_yii_get_command_list`
16+ fi
17+}
18+
19+compdef _yii protected/yiic
20+compdef _yii yiic
21+
22+# Aliases
23+alias yiic='protected/yiic'