66 lines
1.5 KiB
Bash
66 lines
1.5 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 ls='exa --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'
|
|
# 用rust版的exa替代ls
|
|
alias ll='exa -l --time-style long-iso'
|
|
alias la='ll -a'
|
|
alias l='ll'
|
|
|
|
|
|
|
|
alias copy='xclip -selection clipboard'
|
|
#alias echo='printf'
|
|
|
|
|
|
|
|
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
|
|
|
|
#. "/home/yutent/.flutter-completion"
|