From dc9d1ef3154c74f557fd1089a52b5b91bd1170f5 Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Mon, 20 Jun 2022 22:46:04 +0800 Subject: [PATCH] update .bashrc --- dot/.bashrc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dot/.bashrc b/dot/.bashrc index 9c5bdf8..6dcab0d 100644 --- a/dot/.bashrc +++ b/dot/.bashrc @@ -29,3 +29,27 @@ alias ll="ls -l" alias la="ls -a" alias lh="ls -lh" alias lha="ls -lha" + +if [[ "${TERM}" != "tmux-256color" ]]; then + tmux +fi + +set-proxy() { + export http_proxy=http://127.0.0.1:8118 + export https_proxy=https://127.0.0.1:8118 +} + +unset-proxy() { + unset http_proxy + unset https_proxy +} + +set-npm-proxy() { + npm config set proxy http://127.0.0.1:8118 + npm config set https-proxy http://127.0.0.1:8118 +} + +unset-npm-proxy() { + npm config delete proxy + npm config delete https-proxy +}