composer/composer — pull request #1110 by derrabus (2012-09-15 10:49:26+00:00)
Title: Added global --working-dir option

This is a lightweight attempt to address issue #503.

I've added a global option --working-dir with shortcut -d that allows to run any composer command as if composer was called from the specified working directory. Instead of
```bash
cd /path/to/my/project
php /path/to/composer.phar install
```
I can now simply run
```bash
php /path/to/composer.phar install -d /path/to/my/project
```

Internally, composer switches to the given directory before executing the the specified command.