修改zshrc文件

  1. $ vim ~/.zshrc //编辑 .zshrc 文件
  2. $ source ~/.zshrc //重新加载 .zshrc 文件
  3. $ cat ~/.zshrc //查看 .zshrc 文件

zshrc配置

  1. # If you come from bash you might have to change your $PATH.
  2. # export PATH=$HOME/bin:/usr/local/bin:$PATH
  3. # Path to your oh-my-zsh installation.
  4. export ZSH="/Users/zhangxiaozheng/.oh-my-zsh"
  5. # Set name of the theme to load --- if set to "random", it will
  6. # load a random theme each time oh-my-zsh is loaded, in which case,
  7. # to know which specific one was loaded, run: echo $RANDOM_THEME
  8. # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
  9. ZSH_THEME="robbyrussell"
  10. # Set list of themes to pick from when loading at random
  11. # Setting this variable when ZSH_THEME=random will cause zsh to load
  12. # a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
  13. # If set to an empty array, this variable will have no effect.
  14. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
  15. # Uncomment the following line to use case-sensitive completion.
  16. # CASE_SENSITIVE="true"
  17. # Uncomment the following line to use hyphen-insensitive completion.
  18. # Case-sensitive completion must be off. _ and - will be interchangeable.
  19. # HYPHEN_INSENSITIVE="true"
  20. # Uncomment the following line to disable bi-weekly auto-update checks.
  21. # DISABLE_AUTO_UPDATE="true"
  22. # Uncomment the following line to automatically update without prompting.
  23. # DISABLE_UPDATE_PROMPT="true"
  24. # Uncomment the following line to change how often to auto-update (in days).
  25. # export UPDATE_ZSH_DAYS=13
  26. # Uncomment the following line if pasting URLs and other text is messed up.
  27. # DISABLE_MAGIC_FUNCTIONS=true
  28. # Uncomment the following line to disable colors in ls.
  29. # DISABLE_LS_COLORS="true"
  30. # Uncomment the following line to disable auto-setting terminal title.
  31. # DISABLE_AUTO_TITLE="true"
  32. # Uncomment the following line to enable command auto-correction.
  33. # ENABLE_CORRECTION="true"
  34. # Uncomment the following line to display red dots whilst waiting for completion.
  35. # COMPLETION_WAITING_DOTS="true"
  36. # Uncomment the following line if you want to disable marking untracked files
  37. # under VCS as dirty. This makes repository status check for large repositories
  38. # much, much faster.
  39. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  40. # Uncomment the following line if you want to change the command execution time
  41. # stamp shown in the history command output.
  42. # You can set one of the optional three formats:
  43. # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  44. # or set a custom format using the strftime function format specifications,
  45. # see 'man strftime' for details.
  46. # HIST_STAMPS="mm/dd/yyyy"
  47. # Would you like to use another custom folder than $ZSH/custom?
  48. # ZSH_CUSTOM=/path/to/new-custom-folder
  49. # Which plugins would you like to load?
  50. # Standard plugins can be found in ~/.oh-my-zsh/plugins/*
  51. # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  52. # Example format: plugins=(rails git textmate ruby lighthouse)
  53. # Add wisely, as too many plugins slow down shell startup.
  54. plugins=(git)
  55. source $ZSH/oh-my-zsh.sh
  56. # User configuration
  57. # export MANPATH="/usr/local/man:$MANPATH"
  58. # You may need to manually set your language environment
  59. # export LANG=en_US.UTF-8
  60. # Preferred editor for local and remote sessions
  61. # if [[ -n $SSH_CONNECTION ]]; then
  62. # export EDITOR='vim'
  63. # else
  64. # export EDITOR='mvim'
  65. # fi
  66. # Compilation flags
  67. # export ARCHFLAGS="-arch x86_64"
  68. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  69. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  70. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  71. # For a full list of active aliases, run `alias`.
  72. #
  73. # Example aliases
  74. # alias zshconfig="mate ~/.zshrc"
  75. # alias ohmyzsh="mate ~/.oh-my-zsh"
  76. alias history="fc -il 1"
  77. alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code"
  78. export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
  79. alias gf='git fetch'
  80. alias gpu='git pull'
  81. alias gpuo='git pull origin'
  82. alias gpuom='git pull origin master'
  83. alias gpuu='git pull upstream'
  84. alias gpuum='git pull upstream master'
  85. alias gps='git push'
  86. alias gpso='git push origin'
  87. alias gpsom='git push origin master'
  88. alias gpsu='git push upstream'
  89. alias gpsum='git push upstream master'
  90. alias gco='git checkout'
  91. alias gb='git branch'
  92. alias gt='git tag'
  93. alias gl='git log'
  94. alias gs='git status'
  95. alias ga='git add'
  96. alias gci='git commit -m'
  97. alias gm='git merge'
  98. alias gd='git diff'
  99. alias grb='git rebase -i'
  100. alias gqa='git fetch upstream; git reset --hard upstream/qa'
  101. alias gpro='git fetch upstream; git reset --hard upstream/production'
  102. # 这样 push qa 分支之后会自动创建 mr 然后自动合并
  103. alias push-qa="git push origin -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.target=qa"