Files
profiles/bash/.bashrc
2026-05-06 13:34:56 +08:00

37 lines
1021 B
Bash

PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\w\[\033[00m\]\$ '
# enable bash completion in interactive non-login shell
if [ "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO-}" = x ]; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
fi
fi
# colorful for bash
alias ls="ls -F --color=auto"
alias grep="grep --color=auto"
Profile_PATH=$HOME/My/profiles
for i in $(ls $Profile_PATH/aliases); do
. $Profile_PATH/aliases/$i
done
# Proxy
alias setproxy="export http_proxy=http://127.0.0.1:7890 https_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890"
alias unsetproxy="unset http_proxy https_proxy all_proxy"
# Python venv
alias newvenv="python -m venv .venv"
alias actvenv=". .venv/bin/activate"
# Container
alias crt="c run -it --rm" # container run temporarily
alias ce="c exec -it" # container exec
# PATH
PATH="$PATH:$HOME/bin/"
PATH="$PATH:$HOME/go/bin/"
PATH="$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts"
export PATH