diff options
author | Humphrey Lin <[email protected]> | 2020-11-26 12:50:22 +0800 |
---|---|---|
committer | Humphrey Lin <[email protected]> | 2020-11-26 12:50:22 +0800 |
commit | 6c0e55563b7ae36b8d3b5fa81d731cbcf9db4312 (patch) | |
tree | 24b2e805f2781e7c0846b3704ca99c0688ea0b47 /.zshrc | |
parent | 79035ca45fa13628fd8c34c369d6a8cbc22068b4 (diff) | |
download | dotfiles-6c0e55563b7ae36b8d3b5fa81d731cbcf9db4312.tar.gz dotfiles-6c0e55563b7ae36b8d3b5fa81d731cbcf9db4312.tar.bz2 dotfiles-6c0e55563b7ae36b8d3b5fa81d731cbcf9db4312.zip |
Add wsl2 config and emacs config
Diffstat (limited to '.zshrc')
-rw-r--r-- | .zshrc | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -8,11 +8,6 @@ HISTSIZE=1000 SAVEHIST=1000 HISTFILE=~/.zsh_history -export EDITOR=/usr/bin/vim -[ -f /usr/local/bin/mvim ] && \ - export EDITOR='/usr/local/bin/mvim -v' \ - alias vim='mvim -v' - # file [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh @@ -27,9 +22,6 @@ export no_proxy=localhost,127.0.0.1 case `uname` in Darwin) # commands for macOS - export PATH="/usr/local/opt/openjdk/bin:$PATH" - export CPPFLAGS="-I/usr/local/opt/openjdk/include" - [ -d $HOME/.gem ] && export GEM_HOME="$HOME/.gem" ;; Linux) # commands for Linux @@ -39,10 +31,18 @@ FreeBSD) ;; esac +# WSL 2 +if [[ `uname -a` =~ "microsoft" ]]; then + export hostip=$(cat /etc/resolv.conf | grep -oP '(?<=nameserver\ ).*') + export http_proxy="socks5://${hostip}:7890" + export https_proxy="socks5://${hostip}:7890" + export all_proxy="socks5://${hostip}:7890" +fi + # zplug if [ ! -d ~/.zplug ]; then echo 'Installing zplug ... ' - git clone [email protected]:zplug/zplug.git ~/.zplug + git clone https://github.com/zplug/zplug.git ~/.zplug fi source ~/.zplug/init.zsh zplug "plugins/git", from:oh-my-zsh |