update .bashrc
This commit is contained in:
17
dot/.bashrc
17
dot/.bashrc
@@ -33,7 +33,7 @@ alias lha="ls -lha"
|
|||||||
|
|
||||||
set-proxy() {
|
set-proxy() {
|
||||||
export http_proxy=http://127.0.0.1:8118
|
export http_proxy=http://127.0.0.1:8118
|
||||||
export https_proxy=https://127.0.0.1:8118
|
export https_proxy=http://127.0.0.1:8118
|
||||||
}
|
}
|
||||||
|
|
||||||
unset-proxy() {
|
unset-proxy() {
|
||||||
@@ -47,6 +47,8 @@ set-git-proxy() {
|
|||||||
if [[ "$1" == "-s" ]]; then
|
if [[ "$1" == "-s" ]]; then
|
||||||
prefix_cmd="sudo"
|
prefix_cmd="sudo"
|
||||||
flag="--system"
|
flag="--system"
|
||||||
|
elif [[ "$1" == "-l" ]]; then
|
||||||
|
flag="--local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$prefix_cmd git config $flag http.proxy http://127.0.0.1:8118
|
$prefix_cmd git config $flag http.proxy http://127.0.0.1:8118
|
||||||
@@ -59,6 +61,8 @@ unset-git-proxy() {
|
|||||||
if [[ "$1" == "-s" ]]; then
|
if [[ "$1" == "-s" ]]; then
|
||||||
prefix_cmd="sudo"
|
prefix_cmd="sudo"
|
||||||
flag="--system"
|
flag="--system"
|
||||||
|
elif [[ "$1" == "-l" ]]; then
|
||||||
|
flag="--local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$prefix_cmd git config $flag --unset http.proxy
|
$prefix_cmd git config $flag --unset http.proxy
|
||||||
@@ -75,7 +79,7 @@ unset-npm-proxy() {
|
|||||||
npm config delete https-proxy
|
npm config delete https-proxy
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "${TERM}" != "tmux-256color" ]]; then
|
if [[ "${TERM}" != "tmux-256color" ]] && [[ -x $(type -p tmux) ]]; then
|
||||||
tmux
|
tmux
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -93,3 +97,12 @@ export PATH="$PNPM_HOME:$PATH"
|
|||||||
# tabtab source for packages
|
# tabtab source for packages
|
||||||
# uninstall by removing these lines
|
# uninstall by removing these lines
|
||||||
[ -f ~/.config/tabtab/bash/__tabtab.bash ] && . ~/.config/tabtab/bash/__tabtab.bash || true
|
[ -f ~/.config/tabtab/bash/__tabtab.bash ] && . ~/.config/tabtab/bash/__tabtab.bash || true
|
||||||
|
|
||||||
|
clean-pnpm-node() {
|
||||||
|
if [[ -d "$PNPM_HOME" ]]; then
|
||||||
|
rm -f "$PNPM_HOME/nodejs_current"
|
||||||
|
rm -f "$PNPM_HOME/node"
|
||||||
|
rm -f "$PNPM_HOME/npm"
|
||||||
|
rm -f "$PNPM_HOME/npx"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user