Mac终端配置

1
2
3
4
5
6
7
8
9
10
# alias
alias ll="ls -lhvG"
alias lla="ls -alhvG"

function git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return;
echo "("${ref#refs/heads/}")";
}

export PS1="[\[\e[31m\]\u@\[\e[32m\]\w\[\033[1;36m\]\$(git_branch)\[\e[0m\]]\$"