87cbf3fcf1e295f11ef3e0b6f928861575854fe6

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Fix styling in cakephp3 completion

Diff

 1diff --git a/plugins/cakephp3/cakephp3.plugin.zsh b/plugins/cakephp3/cakephp3.plugin.zsh
 2index 2b0f58998af960c944d2f220428f8953d6ab99ce..dbfbeba3b267f3a1c8aa85b61ab33afade2898d5 100644
 3--- a/plugins/cakephp3/cakephp3.plugin.zsh
 4+++ b/plugins/cakephp3/cakephp3.plugin.zsh
 5@@ -8,21 +8,22 @@ _cakephp3_get_sub_command_list () {
 6 }
 7 
 8 _cakephp3_get_3rd_argument () {
 9-	bin/cake ${words[2]} ${words[3]} | grep '\-\ '| awk '{print $2}'
10+	bin/cake ${words[2]} ${words[3]} | \grep '\-\ '| \awk '{print $2}'
11 }
12 
13 _cakephp3 () {
14-  has3rdargument=("all" "controller" "fixture" "model" "template")
15-  if [ -f bin/cake ]; then
16+	local -a has3rdargument
17+	has3rdargument=("all" "controller" "fixture" "model" "template")
18+	if [ -f bin/cake ]; then
19 		if (( CURRENT == 2 )); then
20-			compadd `_cakephp3_get_command_list`
21+			compadd $(_cakephp3_get_command_list)
22 		fi
23 		if (( CURRENT == 3 )); then
24-			compadd `_cakephp3_get_sub_command_list`
25+			compadd $(_cakephp3_get_sub_command_list)
26 		fi
27 		if (( CURRENT == 4 )); then
28-			if [[ ${has3rdargument[(i)${words[3]}]} -le ${#has3rdargument} ]] ; then ;
29-			 compadd `_cakephp3_get_3rd_argument`
30+			if [[ ${has3rdargument[(i)${words[3]}]} -le ${#has3rdargument} ]]; then
31+				compadd $(_cakephp3_get_3rd_argument)
32 			fi
33 		fi
34   fi