73 options="$("$ec" listcommands "$cmd" 2>/dev/null)" || options="" |
73 options="$("$ec" listcommands "$cmd" 2>/dev/null)" || options="" |
74 instances="$("$ec" listinstances 2>/dev/null)" || instances="" |
74 instances="$("$ec" listinstances 2>/dev/null)" || instances="" |
75 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $instances' -- "$cur")) |
75 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $instances' -- "$cur")) |
76 ;; |
76 ;; |
77 # commands with template as argument |
77 # commands with template as argument |
78 i18nupdate) |
78 i18ncube) |
79 cubes="$("$ec" listcubes 2>/dev/null)" || cubes="" |
79 cubes="$("$ec" listcubes 2>/dev/null)" || cubes="" |
80 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $cubes' -- "$cur")) |
80 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $cubes' -- "$cur")) |
81 ;; |
81 ;; |
82 # generic commands with instance as argument |
82 # generic commands with instance as argument |
83 start|stop|reload|restart|upgrade|start-repository|db-create|db-init|db-check|db-grant-user) |
83 start|stop|reload|restart|upgrade|start-repository|db-create|db-init|db-check|db-grant-user) |
84 options="$("$ec" listcommands "$cmd" 2>/dev/null)" || options="" |
84 options="$("$ec" listcommands "$cmd" 2>/dev/null)" || options="" |
85 instances="$("$ec" listinstances 2>/dev/null)" || instances="" |
85 instances="$("$ec" listinstances 2>/dev/null)" || instances="" |
86 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $instances' -- "$cur")) |
86 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $instances' -- "$cur")) |
87 ;; |
87 ;; |
88 # generic commands without argument |
88 # generic commands without argument |
89 list|newtemplate|i18nlibupdate|live-server) |
89 list|newtemplate|i18ncubicweb|live-server) |
90 options="$("$ec" listcommands "$cmd" 2>/dev/null)" || options="" |
90 options="$("$ec" listcommands "$cmd" 2>/dev/null)" || options="" |
91 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $instances' -- "$cur")) |
91 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $instances' -- "$cur")) |
92 ;; |
92 ;; |
93 # generic commands without option |
93 # generic commands without option |
94 shell|i18ncompile|delete|status|schema-sync) |
94 shell|i18ninstance|delete|status|schema-sync) |
95 instances="$("$ec" listinstances 2>/dev/null)" || instances="" |
95 instances="$("$ec" listinstances 2>/dev/null)" || instances="" |
96 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $instances' -- "$cur")) |
96 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$options $instances' -- "$cur")) |
97 ;; |
97 ;; |
98 # XXX should do better |
98 # XXX should do better |
99 create) |
99 create) |