X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fpipenv%2Fpipenv.plugin.zsh;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fpipenv%2Fpipenv.plugin.zsh;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=4be61a92055931235324d149796dbb8f440ebf2a;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/pipenv/pipenv.plugin.zsh b/stow/oh-my-zsh/.oh-my-zsh/plugins/pipenv/pipenv.plugin.zsh deleted file mode 100644 index 4be61a9..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/pipenv/pipenv.plugin.zsh +++ /dev/null @@ -1,44 +0,0 @@ -# Pipenv completion -_pipenv() { - eval $(env COMMANDLINE="${words[1,$CURRENT]}" _PIPENV_COMPLETE=complete-zsh pipenv) -} -compdef _pipenv pipenv - -# Automatic pipenv shell activation/deactivation -_togglePipenvShell() { - # deactivate shell if Pipfile doesn't exist and not in a subdir - if [[ ! -f "$PWD/Pipfile" ]]; then - if [[ "$PIPENV_ACTIVE" == 1 ]]; then - if [[ "$PWD" != "$pipfile_dir"* ]]; then - exit - fi - fi - fi - - # activate the shell if Pipfile exists - if [[ "$PIPENV_ACTIVE" != 1 ]]; then - if [[ -f "$PWD/Pipfile" ]]; then - export pipfile_dir="$PWD" - pipenv shell - fi - fi -} -autoload -U add-zsh-hook -add-zsh-hook chpwd _togglePipenvShell -_togglePipenvShell - -# Aliases -alias pch="pipenv check" -alias pcl="pipenv clean" -alias pgr="pipenv graph" -alias pi="pipenv install" -alias pidev="pipenv install --dev" -alias pl="pipenv lock" -alias po="pipenv open" -alias prun="pipenv run" -alias psh="pipenv shell" -alias psy="pipenv sync" -alias pu="pipenv uninstall" -alias pwh="pipenv --where" -alias pvenv="pipenv --venv" -alias ppy="pipenv --py"