2023-06-26 15:39:58 +08:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
2023-07-28 19:50:33 +08:00
|
|
|
export HISTTIMEFORMAT="[%F %T] "
|
2023-06-26 15:39:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
# update the values of LINES and COLUMNS.
|
|
|
|
shopt -s checkwinsize
|
|
|
|
|
2023-07-13 13:13:24 +08:00
|
|
|
PS1='\[\e[1;31m\]\[\e[32m\]\[\e[33m\]\[\e[m\]\[\e[34m\] \w\[\e[m\]\[\e[31m\]$(__git_ps1)\[\e[m\] '
|
2023-06-26 15:39:58 +08:00
|
|
|
|
|
|
|
|
2023-07-28 19:50:33 +08:00
|
|
|
|
2023-06-26 15:39:58 +08:00
|
|
|
# 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)"
|
2023-07-28 19:50:33 +08:00
|
|
|
#alias ls='ls --color=auto'
|
|
|
|
alias ls='exa --color=auto'
|
2023-06-26 15:39:58 +08:00
|
|
|
#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
|
2023-07-28 19:50:33 +08:00
|
|
|
#alias ll='ls -lh --time-style=+%Y.%m.%d_%H:%M'
|
|
|
|
# 用rust版的exa替代ls
|
|
|
|
alias ll='exa -l --time-style long-iso'
|
2023-06-26 15:39:58 +08:00
|
|
|
alias la='ll -a'
|
|
|
|
alias l='ll'
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-28 19:50:33 +08:00
|
|
|
alias copy='xclip -selection clipboard'
|
|
|
|
#alias echo='printf'
|
2023-06-26 15:39:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2023-07-04 19:04:31 +08:00
|
|
|
fi
|
2023-07-28 19:50:33 +08:00
|
|
|
|
|
|
|
#. "/home/yutent/.flutter-completion"
|