Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. #
  2. # Executes commands at the start of an interactive session.
  3. #
  4. # Authors:
  5. # Sorin Ionescu <sorin.ionescu@gmail.com>
  6. #
  7.  
  8. # Source Prezto.
  9. if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
  10. source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
  11. fi
  12.  
  13. # Customize to your needs...
  14. # ---------------------------
  15.  
  16.  
  17. # -------------------------------------------------------------------
  18. # Sources
  19. # -------------------------------------------------------------------
  20. source ~/.zsh-nvm/zsh-nvm.plugin.zsh
  21. source ~/z.sh
  22. source ~/.zsh-emojis/emojis.plugin.zsh
  23.  
  24. # Default theme
  25. ZSH_THEME="pure"
  26.  
  27.  
  28. # Uncomment following line if you want red dots to be displayed while waiting for completion
  29. COMPLETION_WAITING_DOTS="true"
  30.  
  31. # -------------------------------------------------------------------
  32. # Git
  33. # -------------------------------------------------------------------
  34. ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
  35. ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
  36. ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
  37. ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
  38. ZSH_THEME_GIT_PROMPT_CLEAN=""
  39.  
  40. alias ga='git add -A'
  41. alias gp='git push'
  42. alias gl='git log'
  43. alias gs='git status'
  44. alias gd='git diff'
  45. alias gm='git commit -m'
  46. alias gma='git commit -am'
  47. alias gb='git branch'
  48. alias gc='git checkout'
  49. alias gra='git remote add'
  50. alias grr='git remote rm'
  51. alias gpu='git pull'
  52. alias gcl='git clone'
  53. alias gta='git tag -a -m'
  54. alias gf='git reflog'
  55.  
  56. # leverage an alias from the ~/.gitconfig
  57. alias gh='git hist'
  58. alias glg1='git lg1'
  59. alias glg2='git lg2'
  60. alias glg='git lg'
  61.  
  62.  
  63. # return my IP address
  64. function myip() {
  65. ifconfig lo0 | grep 'inet ' | sed -e 's/:/ /' | awk '{print "lo0 : " $2}'
  66. ifconfig en0 | grep 'inet ' | sed -e 's/:/ /' | awk '{print "en0 (IPv4): " $2 " " $3 " " $4 " " $5 " " $6}'
  67. ifconfig en0 | grep 'inet6 ' | sed -e 's/ / /' | awk '{print "en0 (IPv6): " $2 " " $3 " " $4 " " $5 " " $6}'
  68. ifconfig en1 | grep 'inet ' | sed -e 's/:/ /' | awk '{print "en1 (IPv4): " $2 " " $3 " " $4 " " $5 " " $6}'
  69. ifconfig en1 | grep 'inet6 ' | sed -e 's/ / /' | awk '{print "en1 (IPv6): " $2 " " $3 " " $4 " " $5 " " $6}'
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement