Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mrmechko on github.
  • I am thesoulshell (https://keybase.io/thesoulshell) on keybase.
  • I have a public key ASAJj9au7b8ElILyUybTp7XfGXYBufSP9zbtLyYkGICU9Ao

To claim this, I am signing this object:

@mrmechko
mrmechko / wrap_pyenv.sh
Created December 6, 2018 17:04
How to wrap a python executable tied to a specific python version when using `pyenv`
wrap_pyenv() {
if [ "$#" -eq 2 ]; then
if [[ -a "~/bin/$1" ]]; then
echo "Command $1 exists. remove it first"
exit
fi
echo $'export PYENV_VIRTUALENV_DISABLE_PROMPT=1' > ~/bin/$1
echo $'eval "$(pyenv init -)"' >> ~/bin/$1
echo $'eval "$(pyenv virtualenv-init -)"' >> ~/bin/$1
echo $'pyenv activate '$2 >> ~/bin/$1
" ensure that plug is installed
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin()