Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

simple composer plugin #1178

Closed
wants to merge 5 commits into from

4 participants

@natrim

add simple composer plugin with subcommands completion

@woodworker

nice plugin, works good for me, thx

@thewatts

For whatever, reason - I'm seeing this when trying ::

zsh: command not found: composer

I've added composer to my .zshrc

plugins=(git composer)

I've also upgraded zsh, reloaded, etc.

Any help would be stellar! Thanks!

@natrim

this plugin does not install composer for you, you need to download it and copy somewhere into system PATH

or use the cget alias to install it into current folder

@thewatts

Thanks for the quick response!

I've actually already installed it per : http://chris-schmitz.com/getting-started-with-laravel-4/

-- I also installed via https://github.com/composer/composer (global manual install)

I've checked my path from my .zshrc - it has usr/local/bin in it already.

No dice :/

@natrim

did u install it to right folder?
copy all files in this pull to ~/.oh-my-zsh/custom/plugins/composer
and then reload zsh

btw. composer should be working prior to enabling this plugin, otherwise u have it wrongly installed

@robbyrussell
Owner

Looks like we already have a composer plugin merged. Apologies if this one came first. :-/

@natrim

thatz sad :cry:, but i gues il live with it :walking:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 20, 2012
  1. @natrim
Commits on Jun 21, 2012
  1. @natrim

    add arguments

    natrim authored
  2. @natrim

    move the aliases a little

    natrim authored
  3. @natrim

    tabs

    natrim authored
Commits on Oct 10, 2012
  1. @natrim

    Update plugins/composer/composer.plugin.zsh

    natrim authored
    add more aliases
This page is out of date. Refresh to see the latest.
View
21 plugins/composer/_composer
@@ -0,0 +1,21 @@
+#compdef composer
+#autoload
+
+local -a _1st_arguments
+
+_1st_arguments=(`composer --no-ansi | sed "1,/Available commands/d" | awk '{ printf $1":"; for (i = 2; i <= NF; i++) printf "%s\xc2\xa0",$i; printf "\n" }'`)
+
+_arguments \
+ '(--help)--help[Display help message.]' \
+ '(--quiet)--quiet[Do not output any message.]' \
+ '(--verbose)--verbose[Increase verbosity of messages.]' \
+ '(--version)--version[Display this application version.]' \
+ '(--ansi)--ansi[Force ANSI output.]' \
+ '(--no-ansi)--no-ansi[Disable ANSI output.]' \
+ '(--no-interaction)--no-interaction[Do not ask any interactive question.]' \
+ '*:: :->subcmds' && return 0
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "composer subcommand" _1st_arguments
+ return
+fi
View
21 plugins/composer/_composer.phar
@@ -0,0 +1,21 @@
+#compdef composer.phar
+#autoload
+
+local -a _1st_arguments
+
+_1st_arguments=(`composer.phar --no-ansi | sed "1,/Available commands/d" | awk '{ printf $1":"; for (i = 2; i <= NF; i++) printf "%s\xc2\xa0",$i; printf "\n" }'`)
+
+_arguments \
+ '(--help)--help[Display help message.]' \
+ '(--quiet)--quiet[Do not output any message.]' \
+ '(--verbose)--verbose[Increase verbosity of messages.]' \
+ '(--version)--version[Display this application version.]' \
+ '(--ansi)--ansi[Force ANSI output.]' \
+ '(--no-ansi)--no-ansi[Disable ANSI output.]' \
+ '(--no-interaction)--no-interaction[Do not ask any interactive question.]' \
+ '*:: :->subcmds' && return 0
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "composer.phar subcommand" _1st_arguments
+ return
+fi
View
21 plugins/composer/composer.plugin.zsh
@@ -0,0 +1,21 @@
+# main alias
+if which composer.phar &> /dev/null; then
+ if which composer &> /dev/null; then
+ else
+ alias composer="composer.phar"
+ fi
+else
+ if which composer &> /dev/null; then
+ alias composer.phar="composer"
+ fi
+fi
+
+# other aliases
+alias c='composer'
+alias csu='composer self-update'
+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'
Something went wrong with that request. Please try again.