update_pipenv.sh 463 B

12345678910111213141516171819202122
  1. #!/usr/bin/env zsh
  2. echo "Updating pipenv completion"
  3. currpath=$(realpath $PWD)
  4. if [ ! -d ${currpath}/compiled ]; then
  5. mkdir compiled
  6. fi
  7. which pipenv > /dev/null
  8. if [ $? -ne 0 ]; then
  9. echo "Error: you need to install pipenv first!"
  10. exit 1
  11. fi
  12. pipenv --completion > ${currpath}/compiled/pipenv.zsh
  13. if [ ! -d ~/.config/zsh ]; then
  14. mkdir -p ~/.config/zsh
  15. fi
  16. cp ${currpath}/compiled/pipenv.zsh ~/.config/zsh/pipenv.zsh
  17. # vim: set ft=sh et sw=0 ts=2 sts=0: