this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Performance updates for pyenv{-virtualenv}/rbenv

Much faster startup times and prompt times this way, nice!

+74 -23
+3 -22
.config/fish/conf.d/50-config.fish
··· 59 59 /usr/local/bin \ 60 60 /usr/local/sbin 61 61 62 - if status is-interactive 63 - if command -qs pyenv; and not set -qg __fish_pyenv_initialized 64 - # strip out completions, they are slow to source immediately. 65 - # Use a symlink in ~/.config/fish/completions instead 66 - pyenv init --path --no-rehash - | /usr/bin/grep -v completions | source 67 - # 68 - # Disable extraneous message from pyenv-virtualenv, since we use a 69 - # custom prompt anyway 70 - set -gx PYENV_VIRTUALENV_DISABLE_PROMPT 1 62 + test -e {$HOME}/.iterm2_shell_integration.fish; and source {$HOME}/.iterm2_shell_integration.fish 71 63 72 - pyenv virtualenv-init - fish | source 73 - 74 - set -g __fish_pyenv_initialized 75 - end 76 - 77 - if command -qs rbenv; and not set -qg __fish_rbenv_initialized 78 - rbenv init - --no-rehash | source 79 - set -g __fish_rbenv_initialized 80 - end 81 - 82 - if test -f .nvmrc 83 - nvm use 84 - end 64 + if status is-interactive; and test -f .nvmrc 65 + nvm use 85 66 end 86 67 87 68 # This is hella slow, let's not use it for now...
+70
.config/fish/conf.d/51-envs.fish
··· 1 + # "hardcoded" implementations of `pyenv init`, `rbenv init` etc., to save on 2 + # startup cost from those calls invoking bash and stuff like that. 3 + # 4 + # Also slightly modified to be more portable (~ instead of absolute path, globs 5 + # instead of hardcoded versions). 6 + 7 + if status is-interactive 8 + if command -qs pyenv; and not set -qg __fish_pyenv_initialized 9 + ############################################################### 10 + # Begin generated content 11 + ############################################################### 12 + while set pyenv_index (contains -i -- ~/.pyenv/shims $PATH) 13 + set -eg PATH[$pyenv_index] 14 + end 15 + set -e pyenv_index 16 + set -gx PATH ~/.pyenv/shims $PATH 17 + set -gx PYENV_SHELL fish 18 + function pyenv 19 + set command $argv[1] 20 + set -e argv[1] 21 + 22 + switch "$command" 23 + case activate deactivate rehash shell 24 + source (pyenv "sh-$command" $argv|psub) 25 + case '*' 26 + command pyenv "$command" $argv 27 + end 28 + end 29 + 30 + # NOTE: Modified to use glob instead of hardcoded version 31 + set -gx PATH /usr/local/Cellar/pyenv-virtualenv/*/shims $PATH 32 + set -gx PYENV_VIRTUALENV_INIT 1 33 + # NOTE: modified for https://github.com/pyenv/pyenv-virtualenv/issues/338 34 + # Also see https://github.com/pyenv/pyenv-virtualenv/issues/45 35 + function _pyenv_virtualenv_hook --on-variable PWD --on-variable PYENV_VERSION 36 + set -l ret $status 37 + if [ -n "$VIRTUAL_ENV" ] 38 + pyenv activate --quiet; or pyenv deactivate --quiet; or true 39 + else 40 + pyenv activate --quiet; or true 41 + end 42 + return $ret 43 + end 44 + ############################################################### 45 + # End generated content 46 + ############################################################### 47 + end 48 + 49 + if command -qs rbenv; and not set -qg __fish_rbenv_initialized 50 + ############################################################### 51 + # Begin generated content 52 + ############################################################### 53 + set -gx PATH ~/.rbenv/shims $PATH 54 + set -gx RBENV_SHELL fish 55 + function rbenv 56 + set command $argv[1] 57 + set -e argv[1] 58 + 59 + switch "$command" 60 + case rehash shell 61 + rbenv "sh-$command" $argv | source 62 + case '*' 63 + command rbenv "$command" $argv 64 + end 65 + end 66 + ############################################################### 67 + # End generated content 68 + ############################################################### 69 + end 70 + end
+1 -1
.vscode/argv.json
··· 20 20 21 21 // Unique id used for correlating crash reports sent from this instance. 22 22 // Do not edit this value. 23 - "crash-reporter-id": "6bd1a9a4-325c-45a1-b049-2a2acdb43dd4", 23 + "crash-reporter-id": "6bd1a9a4-325c-45a1-b049-2a2acdb43dd4" 24 24 }