67 lines
1.6 KiB
Bash
67 lines
1.6 KiB
Bash
|
|
# If not running interactively, don't do anything
|
|
case $- in
|
|
*i*) ;;
|
|
*) return;;
|
|
esac
|
|
|
|
|
|
# append to the history file, don't overwrite it
|
|
shopt -s histappend
|
|
|
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
|
HISTSIZE=20000
|
|
HISTFILESIZE=20000
|
|
|
|
export HISTTIMEFORMAT="[%F %T] "
|
|
|
|
|
|
|
|
# update the values of LINES and COLUMNS.
|
|
shopt -s checkwinsize
|
|
|
|
|
|
PS1='\[\e[1;31m\]\[\e[32m\]\[\e[33m\]\[\e[m\]\[\e[34m\] \w\[\e[m\]\[\e[31m\]$(__git_ps1)\[\e[m\] '
|
|
|
|
|
|
# enable color support of ls and also add handy aliases
|
|
if [ -x /usr/bin/dircolors ]; then
|
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
alias ls='ls --color=auto'
|
|
#alias dir='dir --color=auto'
|
|
#alias vdir='vdir --color=auto'
|
|
|
|
alias grep='grep --color=auto'
|
|
alias fgrep='fgrep --color=auto'
|
|
alias egrep='egrep --color=auto'
|
|
fi
|
|
|
|
# colored GCC warnings and errors
|
|
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
|
|
|
# some more ls aliases
|
|
alias ll='ls -lh --time-style=+%Y.%m.%d_%H:%M'
|
|
alias la='ll -a'
|
|
alias l='ll'
|
|
|
|
|
|
export HTTP_PROXY="http://127.0.0.1:7890"
|
|
export HTTPS_PROXY="http://127.0.0.1:7890"
|
|
export ALL_PROXY="socks5://127.0.0.1:7890"
|
|
export http_proxy="http://127.0.0.1:7890"
|
|
export https_proxy="http://127.0.0.1:7890"
|
|
export all_proxy="socks5://127.0.0.1:7890"
|
|
|
|
export no_proxy="intel-nuc.local,localhost,127.0.0.1,::1"
|
|
|
|
|
|
|
|
|
|
if ! shopt -oq posix; then
|
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
|
. /usr/share/bash-completion/bash_completion
|
|
elif [ -f /etc/bash_completion ]; then
|
|
. /etc/bash_completion
|
|
fi
|
|
fi
|