text Vagrant .bash_profile

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Vagrant .bash_profile相关的知识,希望对你有一定的参考价值。

#########################
# Git
#########################
# Show present working directory and Git branch at prompt
# source: http://www.developerzen.com/2011/01/10/show-the-current-git-branch-in-your-command-prompt/
function parse_git_branch () {
    git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

# aliases
alias g="git"
alias ga="git add"
alias gb="git branch"
alias gc="git commit"
alias gco="git checkout"
alias gcol="git checkout live"
alias gcom="git checkout master"
alias gcos="git checkout stable"
alias gd="git diff"
alias gl="git lg"
alias gm="git merge"
alias gp="git pull --ff"
alias gpol="git push origin live"
alias gpom="git push origin master"
alias gpos="git push origin stable"
alias gs="git status"

# ANSI colors: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
PURPLE="\[\033[0;35m\]"
LIGHT_GREY="\[\033[0;37m\]"
DARK_GREY="\[\033[1;30m\]"
NO_COLOUR="\[\033[0m\]"

# prompt config:
PS1="\[\033[0;31m\]VAGRANT $LIGHT_GREY\w$PURPLE\$(parse_git_branch)$NO_COLOUR\$ "

#########################
# Misc
#########################
alias l='ls -lah'           # Long view, show hidden
alias la='ls -AF'           # Compact view, show hidden
alias ll='ls -lFh'          # Long view, no hidden
alias ls="ls -F --color"    # Good colors for linux ls

#########################
# CD BACKSLASH SHORTHAND
#########################
alias ..='cd ../'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../../'

# Go to public directory by default
# Go to the web root directory after logging in (note: your path may be different!):
cd /vagrant

以上是关于text Vagrant .bash_profile的主要内容,如果未能解决你的问题,请参考以下文章

text 在Homestead Vagrant上的phpmyadmin

text Vagrant pfsense + guest vm。

text 灯Vagrant

text golang vagrant

text 在vagrant ubuntu中添加新站点

text .bash_profile中