From c2a97663f6066b4208d76efc1c35533b187595ef Mon Sep 17 00:00:00 2001 From: Devon Weller Date: Sun, 2 Dec 2012 06:43:11 -0600 Subject: [PATCH 1/4] Added config command documentation. This implements issue #1377. --- doc/03-cli.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/doc/03-cli.md b/doc/03-cli.md index 4c422c756..44b70db35 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -216,6 +216,45 @@ you have to run the command with `root` privileges $ sudo composer self-update +## Config + +The `config` command allows you to edit some basic composer settings in either +the local composer.json file or the global config.json file. + + $ php composer.phar config --list + +### Usage + +`config [options] [setting-key] [setting-value1] ... [setting-valueN]` + +`setting-key` is a configuration option name and `setting-value1` is a +configuration value. For settings that can take an array of values (like +`github-protocols`), more than one setting-value arguments are allowed. + +See the [config schema section](04-schema.md#config) for valid configuration +options. + +### Options + +* **-g|--global:** Operate on the global config file located at +`$COMPOSER_HOME/config.json by` default. Without this option, this command +affects the local composer.json file or a file specified by `--file`. +* **-e|--editor:** Open the local composer.json file using in a text editor as +defined by the `EDITOR env variable. With the `--global` option, this opens +the global config file. +* **--unset:** Remove the configuration element named by `setting-key`. +* **-l|--list:** Show the list of current config variables. With the `--global` + option this lists the global configuration only. +* **-f|--file="...":** Operate on a specific file instead of composer.json. Note + that this cannot be used in conjunction with the `--global` option. + +### Modifying Repositories + +In addition to modifying the config section, the `config` command also supports making +changes to the repositories section by using it the following way: + + $ php composer.phar config repositories.foo vcs http://github.com/foo/bar + ## create-project You can use Composer to create new projects from an existing package. This is From 9aa2c5f1ee93b917d8b9daf833f8fed223c5c508 Mon Sep 17 00:00:00 2001 From: Devon Weller Date: Sun, 2 Dec 2012 06:49:51 -0600 Subject: [PATCH 2/4] Updated config command documentation. This implements issue #1377. --- doc/03-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/03-cli.md b/doc/03-cli.md index 44b70db35..085e4c9dd 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -231,7 +231,7 @@ the local composer.json file or the global config.json file. configuration value. For settings that can take an array of values (like `github-protocols`), more than one setting-value arguments are allowed. -See the [config schema section](04-schema.md#config) for valid configuration +See the [config schema section](04-schema.md#config-root-only) for valid configuration options. ### Options From 385709ba6c9b7cce0b782b065b0ee0a7a7586b29 Mon Sep 17 00:00:00 2001 From: Devon Weller Date: Sun, 2 Dec 2012 06:52:07 -0600 Subject: [PATCH 3/4] Updated config command documentation. This implements issue #1377. --- doc/03-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/03-cli.md b/doc/03-cli.md index 085e4c9dd..25219c77a 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -240,7 +240,7 @@ options. `$COMPOSER_HOME/config.json by` default. Without this option, this command affects the local composer.json file or a file specified by `--file`. * **-e|--editor:** Open the local composer.json file using in a text editor as -defined by the `EDITOR env variable. With the `--global` option, this opens +defined by the `EDITOR` env variable. With the `--global` option, this opens the global config file. * **--unset:** Remove the configuration element named by `setting-key`. * **-l|--list:** Show the list of current config variables. With the `--global` From 0484febffe61841aa1187cbe099cd62b6efb8102 Mon Sep 17 00:00:00 2001 From: Devon Weller Date: Sun, 2 Dec 2012 07:56:01 -0600 Subject: [PATCH 4/4] moved misplaced backtick --- doc/03-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/03-cli.md b/doc/03-cli.md index 25219c77a..0ed5603a3 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -237,7 +237,7 @@ options. ### Options * **-g|--global:** Operate on the global config file located at -`$COMPOSER_HOME/config.json by` default. Without this option, this command +`$COMPOSER_HOME/config.json` by default. Without this option, this command affects the local composer.json file or a file specified by `--file`. * **-e|--editor:** Open the local composer.json file using in a text editor as defined by the `EDITOR` env variable. With the `--global` option, this opens