Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akollade/php-version-switcher.plugin.zsh
Oh My Zsh plugin to switch PHP version from .php-version
https://github.com/akollade/php-version-switcher.plugin.zsh
Last synced: 3 days ago
JSON representation
Oh My Zsh plugin to switch PHP version from .php-version
- Host: GitHub
- URL: https://github.com/akollade/php-version-switcher.plugin.zsh
- Owner: Akollade
- License: mit
- Created: 2022-10-19T08:12:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-12T07:33:20.000Z (about 1 year ago)
- Last Synced: 2024-11-10T13:15:38.474Z (2 months ago)
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-version-switcher.plugin.zsh
This is an [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh) plugin to switch PHP version from .php-version.
# Install
```
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/Akollade/php-version-switcher.plugin.zsh php-version-switcher
```Edit `~/.zshrc` to enable the plugin and set the PHP path template:
```
PHP_PATH_TEMPLATE="/opt/php__PHP_VERSION__/bin"
plugins=(... php-version-switcher)
```Example for `PHP_PATH_TEMPLATE`:
* Infomaniak : `PHP_PATH_TEMPLATE="/opt/php__PHP_VERSION__/bin"`
* Homebrew : `PHP_PATH_TEMPLATE="$(brew --prefix)/opt/php@__PHP_VERSION__/bin"`# Inspired by
* https://github.com/xellos866/php-version_rcfile-switcher
* https://github.com/mathieu-coingt/infomaniak-ssh-php-version