mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
parent
6a7aab47dd
commit
079dbff2c4
2 changed files with 34 additions and 19 deletions
|
@ -1,6 +1,7 @@
|
||||||
# Pipenv
|
# Pipenv
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
In your `.zshrc` file, add `pipenv` to the plugins section
|
In your `.zshrc` file, add `pipenv` to the plugins section
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -8,7 +9,9 @@ plugins=(... pipenv ...)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
This plugin provides some features to simplify the use of Pipenv while working on ZSH.
|
This plugin provides some features to simplify the use of Pipenv while working on ZSH.
|
||||||
|
|
||||||
- Adds completion for pipenv
|
- Adds completion for pipenv
|
||||||
- Auto activates and deactivates pipenv shell
|
- Auto activates and deactivates pipenv shell
|
||||||
- Adds short aliases for common pipenv commands
|
- Adds short aliases for common pipenv commands
|
||||||
|
@ -27,3 +30,13 @@ This plugin provides some features to simplify the use of Pipenv while working o
|
||||||
- `pwh` is aliased to `pipenv --where`
|
- `pwh` is aliased to `pipenv --where`
|
||||||
- `pvenv` is aliased to `pipenv --venv`
|
- `pvenv` is aliased to `pipenv --venv`
|
||||||
- `ppy` is aliased to `pipenv --py`
|
- `ppy` is aliased to `pipenv --py`
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Shell activation
|
||||||
|
|
||||||
|
If you want to disable the shell activation and deactivation feature, add the following style to your `.zshrc` before sourcing `oh-my-zsh.sh`:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
zstyle ':omz:plugins:pipenv' auto-shell no
|
||||||
|
```
|
||||||
|
|
|
@ -12,6 +12,7 @@ fi
|
||||||
|
|
||||||
_PIPENV_COMPLETE=zsh_source pipenv >| "$ZSH_CACHE_DIR/completions/_pipenv" &|
|
_PIPENV_COMPLETE=zsh_source pipenv >| "$ZSH_CACHE_DIR/completions/_pipenv" &|
|
||||||
|
|
||||||
|
if zstyle -T ':omz:plugins:pipenv' auto-shell; then
|
||||||
# Automatic pipenv shell activation/deactivation
|
# Automatic pipenv shell activation/deactivation
|
||||||
_togglePipenvShell() {
|
_togglePipenvShell() {
|
||||||
# deactivate shell if Pipfile doesn't exist and not in a subdir
|
# deactivate shell if Pipfile doesn't exist and not in a subdir
|
||||||
|
@ -34,6 +35,7 @@ _togglePipenvShell() {
|
||||||
autoload -U add-zsh-hook
|
autoload -U add-zsh-hook
|
||||||
add-zsh-hook chpwd _togglePipenvShell
|
add-zsh-hook chpwd _togglePipenvShell
|
||||||
_togglePipenvShell
|
_togglePipenvShell
|
||||||
|
fi
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias pch="pipenv check"
|
alias pch="pipenv check"
|
||||||
|
|
Loading…
Reference in a new issue