summaryrefslogtreecommitdiffstats
path: root/zsh/oh-my-zsh/plugins/composer
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
commita62114c91f2070c8c8453d117f3d81dc113e41ff (patch)
treef266e87af29a08c01f82bc32dd7d463d8ec4441a /zsh/oh-my-zsh/plugins/composer
parentaf120ab348f2e1a5a39dec035ed9dcf84189a64e (diff)
downloaddotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.gz
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.bz2
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.zip
dotfile update
Diffstat (limited to 'zsh/oh-my-zsh/plugins/composer')
-rw-r--r--zsh/oh-my-zsh/plugins/composer/README.md35
-rw-r--r--zsh/oh-my-zsh/plugins/composer/composer.plugin.zsh76
2 files changed, 0 insertions, 111 deletions
diff --git a/zsh/oh-my-zsh/plugins/composer/README.md b/zsh/oh-my-zsh/plugins/composer/README.md
deleted file mode 100644
index ad6ed24..0000000
--- a/zsh/oh-my-zsh/plugins/composer/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# composer
-
-This plugin provides completion for [composer](https://getcomposer.org/), as well as aliases
-for frequent composer commands. It also adds Composer's global binaries to the PATH, using
-Composer if available.
-
-To use it add `composer` to the plugins array in your zshrc file.
-
-```zsh
-plugins=(... composer)
-```
-
-Original author: Daniel Gomes <me@danielcsgomes.com>
-
-## 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 <installer> \| 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 <config-home>` | Updates globally installed packages |
diff --git a/zsh/oh-my-zsh/plugins/composer/composer.plugin.zsh b/zsh/oh-my-zsh/plugins/composer/composer.plugin.zsh
deleted file mode 100644
index dd0b18e..0000000
--- a/zsh/oh-my-zsh/plugins/composer/composer.plugin.zsh
+++ /dev/null
@@ -1,76 +0,0 @@
-## Basic Composer command completion
-# Since Zsh 5.7, an improved composer command completion is provided
-if ! is-at-least 5.7; then
- _composer () {
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments '*:: :->subcmds'
-
- if (( CURRENT == 1 )) || ( (( CURRENT == 2 )) && [[ "$words[1]" = "global" ]] ); then
- # Command list
- local -a subcmds
- subcmds=("${(@f)"$($_comp_command1 --no-ansi 2>/dev/null | awk '
- /Available commands/{ r=1 }
- r == 1 && /^[ \t]*[a-z]+/{
- gsub(/^[ \t]+/, "")
- gsub(/ +/, ":")
- print $0
- }
- ')"}")
- _describe -t commands 'composer command' subcmds
- else
- # Required list
- compadd $($_comp_command1 show -s --no-ansi 2>/dev/null \
- | sed '1,/requires/d' \
- | awk 'NF > 0 && !/^requires \(dev\)/{ print $1 }')
- fi
- }
-
- compdef _composer composer
- compdef _composer composer.phar
-fi
-
-
-## Aliases
-alias c='composer'
-alias ccp='composer create-project'
-alias cdo='composer dump-autoload -o'
-alias cdu='composer dump-autoload'
-alias cget='curl -s https://getcomposer.org/installer | php'
-alias cgr='composer global require'
-alias cgrm='composer global remove'
-alias cgu='composer global update'
-alias ci='composer install'
-alias co='composer outdated'
-alias cod='composer outdated --direct'
-alias cr='composer require'
-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
-if (( ! $+commands[composer] )); then
- [[ -d "$HOME/.composer/vendor/bin" ]] && export PATH="$PATH:$HOME/.composer/vendor/bin"
- [[ -d "$HOME/.config/composer/vendor/bin" ]] && export PATH="$PATH:$HOME/.config/composer/vendor/bin"
-
- # If still not found, don't do the rest of the script
- (( $+commands[composer] )) || return 0
-fi
-
-
-## Add Composer's global binaries to PATH
-autoload -Uz _store_cache _retrieve_cache _cache_invalid
-_retrieve_cache composer
-
-if [[ -z $__composer_bin_dir ]]; then
- __composer_bin_dir=$(composer global config bin-dir --absolute 2>/dev/null)
- _store_cache composer __composer_bin_dir
-fi
-
-# Add Composer's global binaries to PATH
-export PATH="$PATH:$__composer_bin_dir"
-
-unset __composer_bin_dir