zconfig/update_pipenv.sh

23 lines
482 B
Bash
Raw Permalink Normal View History

2020-04-29 12:54:10 +02:00
#!/usr/bin/env zsh
2023-05-19 22:12:53 +02:00
echo "=> Updating pipenv completion"
2020-04-29 12:54:10 +02:00
currpath=$(realpath $PWD)
if [ ! -d ${currpath}/compiled ]; then
mkdir compiled
fi
which pipenv > /dev/null
if [ $? -ne 0 ]; then
echo "Error: you need to install pipenv first!"
exit 1
fi
2023-05-12 17:56:28 +02:00
_PIPENV_COMPLETE=zsh_source pipenv > ${currpath}/compiled/pipenv.zsh
2020-04-29 12:54:10 +02:00
if [ ! -d ~/.config/zsh ]; then
mkdir -p ~/.config/zsh
fi
cp ${currpath}/compiled/pipenv.zsh ~/.config/zsh/pipenv.zsh
2023-05-19 22:12:53 +02:00
# vim: set ft=zsh et sw=0 ts=2 sts=0: