From e3de97ca89368bb433034431778a29f7f09db6c2 Mon Sep 17 00:00:00 2001 From: Daniel Gomes Date: Fri, 5 Oct 2012 21:12:40 +0100 Subject: [PATCH 1/3] added two aliases to Symfony2 Plugin --- plugins/symfony2/symfony2.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 64426684..22340129 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -10,4 +10,8 @@ _symfony2 () { fi } -compdef _symfony2 app/console \ No newline at end of file +compdef _symfony2 app/console + +#Alias +alias sf2='php app/console' +alias sf2clear='php app/console cache:clear' \ No newline at end of file From 6630919bce0ec9eb5ad33c26a32cd5f06529d570 Mon Sep 17 00:00:00 2001 From: Daniel Gomes Date: Fri, 5 Oct 2012 21:13:10 +0100 Subject: [PATCH 2/3] added Composer completition and aliases --- plugins/composer/composer.plugin.zsh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 plugins/composer/composer.plugin.zsh diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh new file mode 100644 index 00000000..a054ae2c --- /dev/null +++ b/plugins/composer/composer.plugin.zsh @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# FILE: composer.plugin.zsh +# DESCRIPTION: oh-my-zsh composer plugin file. +# AUTHOR: Daniel Gomes (me@danielcsgomes.com) +# VERSION: 1.0.0 +# ------------------------------------------------------------------------------ + +# Composer basic command completion +_composer_get_command_list () { + composer --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' +} + +_composer () { + if [ -f composer.json ]; then + compadd `_composer_get_command_list` + fi +} + +compdef _composer composer + +# Aliases +alias c='composer' +alias csu='composer self-update' +alias cu='composer update' +alias ci='composer install' +alias ccp='composer create-project' + +alias cget='curl -s https://getcomposer.org/installer | php' \ No newline at end of file From 9365fd03f62854c48bc06388542ba4933eb067db Mon Sep 17 00:00:00 2001 From: Daniel Gomes Date: Fri, 5 Oct 2012 21:14:44 +0100 Subject: [PATCH 3/3] added a comment to the composer installation alias --- plugins/composer/composer.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index a054ae2c..c9b762d0 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -25,4 +25,5 @@ alias cu='composer update' alias ci='composer install' alias ccp='composer create-project' +# install composer in the current directory alias cget='curl -s https://getcomposer.org/installer | php' \ No newline at end of file