首页 » 后端 » Laravel » 正文

Homestead 配置

发布者:站点默认
2019/09/24 浏览数(538) 分类:Laravel, Linux Homestead 配置已关闭评论

重置 vagrant box

vagrant provision
vagrant reload --provision

配置文件

Homestead.yaml - 主要配置信息文件,包含共享文件夹、站点、数据库等
after.sh       - 盒子重置后(provision)调用的 shell
aliases        - 盒子重置后(provision)添加至虚拟机的 ~/.bash_aliases

after.sh

#!/bin/sh

# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.

git config --global user.name homestead.deepin
git config --global user.email homestead.deepin@git.upall.cn
git config --global pull.rebase true
git config --global core.editor vim
git config --global credential.helper store

echo "\e[A": history-search-backward >> ~/.inputrc
echo "\e[B": history-search-forward  >> ~/.inputrc
echo "\e[1;2C": forward-word         >> ~/.inputrc
echo "\e[1;2D": backward-word        >> ~/.inputrc
echo set show-all-if-ambiguous on    >> ~/.inputrc
echo set completion-ignore-case on   >> ~/.inputrc

cat >> ~/.bashrc <<EOF
PS1=''
PS1=\$PS1'\H\$'
PS1=\$PS1' '
PS1=\$PS1'\[\e[0;32m\]\u\[\e[0m\]:\[\e[0;34m\]\W\[\e[0m\]'
PS1=\$PS1'\[\e[3;33m\]\$(__git_ps1 " %s")\[\e[0m\]'
PS1=\$PS1'\n'
PS1=\$PS1'\[\e[0;31m\]>\[\e[0m\]'
PS1=\$PS1'\[\e[0;31m\]>\[\e[0m\]'
PS1=\$PS1'\[\e[0;31m\]>\[\e[0m\]'
PS1=\$PS1' '
EOF

aliases

alias ns="npm start"
alias nb="npm run build"
alias gp="git pull"
alias gs="git status"
alias gb="git branch"
alias go="git checkout"
alias ga="git add"
alias gc="git commit"
alias gac="git add . && git commit -m"
alias gu="git push"
alias gl="git log --pretty=format:'%C(green)%cd %Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --abbrev-commit --date='format-local:%Y-%m-%d %H:%M'"
alias gb="git branch"
alias gf="git fetch"
alias gm="git merge"
点击返回顶部
  1. 留言
  2. 联系方式