From 0dc2462f2b7d7a15a6a140b700296cc466dd36d6 Mon Sep 17 00:00:00 2001 From: Nina Siessegger Date: Fri, 2 Oct 2020 10:48:15 +0200 Subject: [PATCH] add git lfs config https://github.com/nvm-sh/nvm/issues/1277#issuecomment-693390529 --- gitconfig | 5 +++++ zshrc | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/gitconfig b/gitconfig index f57f123..326b47e 100644 --- a/gitconfig +++ b/gitconfig @@ -30,3 +30,8 @@ [mergetool "sourcetree"] cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" trustExitCode = true +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true diff --git a/zshrc b/zshrc index 4ec5e97..fac996e 100644 --- a/zshrc +++ b/zshrc @@ -51,10 +51,25 @@ bindkey "^Y" accept-and-hold bindkey "^N" insert-last-word bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy" - +# NVM export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +#[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +NODE_GLOBALS=(`find ~/.nvm/versions/node -maxdepth 3 -type l -wholename '*/bin/*' | xargs -n1 basename | sort | uniq`) +NODE_GLOBALS+=(node nvm yarn) + +_load_nvm() { +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +} + +for cmd in "${NODE_GLOBALS[@]}"; do +eval "function ${cmd}(){ unset -f ${NODE_GLOBALS[*]}; _load_nvm; unset -f _load_nvm; ${cmd} \$@; }" +done +unset cmd NODE_GLOBALS + +export PATH="$PATH:$HOME/.yarn/bin"``` # Pyenv eval "$(pyenv init -)"