sh 来自http://www.harecoded.com/terminal-tuning-for-git-developers-in-mac-2364711
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 来自http://www.harecoded.com/terminal-tuning-for-git-developers-in-mac-2364711相关的知识,希望对你有一定的参考价值。
# I like tunning the colors of the prompt in the first place:
export CLICOLOR='true'
export LSCOLORS="gxfxcxdxbxCgCdabagacad"
export EDITOR=vi
# Git branch in good-looking prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# Prompt with Git branch
# Explanation of the weird lines: \u Username, \h Host, \w Path, tput setaf is the color definition
export PS1='\[$(tput setaf 7)\]\u@\[$(tput setaf 2)\]\h:\[$(tput setaf 4)\]\w$(tput setaf 1)\]$(parse_git_branch)\[$(tput sgr0)\] $ '
# Bonus track: SSH autocompleting hostnames, write ssh and press tab
complete -W "$(while read line; do echo ${line%%[, ]*}; done < ~/.ssh/known_hosts)" ssh
# Git autocompletion# Requires that you execute the following commented line:
# curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
test -f ~/.git-completion.bash && . $_
以上是关于sh 来自http://www.harecoded.com/terminal-tuning-for-git-developers-in-mac-2364711的主要内容,如果未能解决你的问题,请参考以下文章
sh 来自shell的cURL
sh 等待来自URL的200响应循环
sh 来自cacher
sh 来自env文件的Docker机密
sh 我的自卸车装载来自备份
sh 来自终端的快速提醒(bash)