From d384ccf31dca8b0a768c463087f156b7302c77c5 Mon Sep 17 00:00:00 2001 From: Raphael Stolt Date: Tue, 25 Apr 2017 19:52:55 +0200 Subject: [PATCH] feat(composer): add `cuh` alias for updating global packages (#6048) Closes #6048 --- plugins/composer/README.md | 37 ++++++++++++++-------------- plugins/composer/composer.plugin.zsh | 1 + 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/plugins/composer/README.md b/plugins/composer/README.md index 8c79c4109..ad6ed24bc 100644 --- a/plugins/composer/README.md +++ b/plugins/composer/README.md @@ -14,21 +14,22 @@ Original author: Daniel Gomes ## Aliases -| Alias | Command | Description | -| ------ | ---------------------------- | --------------------------------------------------------------------------------------- | -| `c` | `composer` | Starts composer | -| `ccp` | `composer create-project` | Create new project from an existing package | -| `cdo` | `composer dump-autoload -o` | Converts PSR-0/4 autoloading to classmap for a faster autoloader (good for production) | -| `cdu` | `composer dump-autoload` | Updates the autoloader | -| `cget` | `curl -s \| php` | Installs composer in the current directory | -| `cgr` | `composer global require` | Allows require command to run on COMPOSER_HOME directory | -| `cgrm` | `composer global remove` | Allows remove command to run on COMPOSER_HOME directory | -| `cgu` | `composer global update` | Allows update command to run on COMPOSER_HOME directory | -| `ci` | `composer install` | Resolves and installs dependencies from `composer.json` | -| `co` | `composer outdated` | Shows a list of installed packages with available updates | -| `cod` | `composer outdated --direct` | Shows a list of installed packages with available updates which are direct dependencies | -| `cr` | `composer require` | Adds new packages to `composer.json` | -| `crm` | `composer remove` | Removes packages from `composer.json` | -| `cs` | `composer show` | Lists available packages, with optional filtering | -| `csu` | `composer self-update` | Updates composer to the latest version | -| `cu` | `composer update` | Updates composer dependencies and `composer.lock` file | +| Alias | Command | Description | +| ------ | ---------------------------------- | --------------------------------------------------------------------------------------- | +| `c` | `composer` | Starts composer | +| `ccp` | `composer create-project` | Create new project from an existing package | +| `cdo` | `composer dump-autoload -o` | Converts PSR-0/4 autoloading to classmap for a faster autoloader (good for production) | +| `cdu` | `composer dump-autoload` | Updates the autoloader | +| `cget` | `curl -s \| php` | Installs composer in the current directory | +| `cgr` | `composer global require` | Allows require command to run on COMPOSER_HOME directory | +| `cgrm` | `composer global remove` | Allows remove command to run on COMPOSER_HOME directory | +| `cgu` | `composer global update` | Allows update command to run on COMPOSER_HOME directory | +| `ci` | `composer install` | Resolves and installs dependencies from `composer.json` | +| `co` | `composer outdated` | Shows a list of installed packages with available updates | +| `cod` | `composer outdated --direct` | Shows a list of installed packages with available updates which are direct dependencies | +| `cr` | `composer require` | Adds new packages to `composer.json` | +| `crm` | `composer remove` | Removes packages from `composer.json` | +| `cs` | `composer show` | Lists available packages, with optional filtering | +| `csu` | `composer self-update` | Updates composer to the latest version | +| `cu` | `composer update` | Updates composer dependencies and `composer.lock` file | +| `cuh` | `composer update -d ` | Updates globally installed packages | diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index a3883a1f2..dd0b18e27 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -48,6 +48,7 @@ alias crm='composer remove' alias cs='composer show' alias csu='composer self-update' alias cu='composer update' +alias cuh='composer update --working-dir=$(composer config -g home)' ## If Composer not found, try to add known directories to $PATH