Advertisement
anujpandey

zshrc-2020

Oct 29th, 2020
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.96 KB | None | 0 0
  1. # If you come from bash you might have to change your $PATH.
  2. # export PATH=$HOME/bin:/usr/local/bin:$PATH
  3.  
  4. # Path to your oh-my-zsh installation.
  5. export ZSH="/Users/anujpandey/.oh-my-zsh"
  6.  
  7. # Set name of the theme to load --- if set to "random", it will
  8. # load a random theme each time oh-my-zsh is loaded, in which case,
  9. # to know which specific one was loaded, run: echo $RANDOM_THEME
  10. # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
  11. ZSH_THEME="robbyrussell"
  12.  
  13. # Set list of themes to pick from when loading at random
  14. # Setting this variable when ZSH_THEME=random will cause zsh to load
  15. # a theme from this variable instead of looking in $ZSH/themes/
  16. # If set to an empty array, this variable will have no effect.
  17. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
  18.  
  19. # Uncomment the following line to use case-sensitive completion.
  20. # CASE_SENSITIVE="true"
  21.  
  22. # Uncomment the following line to use hyphen-insensitive completion.
  23. # Case-sensitive completion must be off. _ and - will be interchangeable.
  24. # HYPHEN_INSENSITIVE="true"
  25.  
  26. # Uncomment the following line to disable bi-weekly auto-update checks.
  27. # DISABLE_AUTO_UPDATE="true"
  28.  
  29. # Uncomment the following line to automatically update without prompting.
  30. # DISABLE_UPDATE_PROMPT="true"
  31.  
  32. # Uncomment the following line to change how often to auto-update (in days).
  33. # export UPDATE_ZSH_DAYS=13
  34.  
  35. # Uncomment the following line if pasting URLs and other text is messed up.
  36. # DISABLE_MAGIC_FUNCTIONS="true"
  37.  
  38. # Uncomment the following line to disable colors in ls.
  39. # DISABLE_LS_COLORS="true"
  40.  
  41. # Uncomment the following line to disable auto-setting terminal title.
  42. # DISABLE_AUTO_TITLE="true"
  43.  
  44. # Uncomment the following line to enable command auto-correction.
  45. # ENABLE_CORRECTION="true"
  46.  
  47. # Uncomment the following line to display red dots whilst waiting for completion.
  48. # COMPLETION_WAITING_DOTS="true"
  49.  
  50. # Uncomment the following line if you want to disable marking untracked files
  51. # under VCS as dirty. This makes repository status check for large repositories
  52. # much, much faster.
  53. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  54.  
  55. # Uncomment the following line if you want to change the command execution time
  56. # stamp shown in the history command output.
  57. # You can set one of the optional three formats:
  58. # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  59. # or set a custom format using the strftime function format specifications,
  60. # see 'man strftime' for details.
  61. # HIST_STAMPS="mm/dd/yyyy"
  62.  
  63. # Would you like to use another custom folder than $ZSH/custom?
  64. # ZSH_CUSTOM=/path/to/new-custom-folder
  65.  
  66. # Which plugins would you like to load?
  67. # Standard plugins can be found in $ZSH/plugins/
  68. # Custom plugins may be added to $ZSH_CUSTOM/plugins/
  69. # Example format: plugins=(rails git textmate ruby lighthouse)
  70. # Add wisely, as too many plugins slow down shell startup.
  71. plugins=(
  72.   battery
  73.   bgnotify
  74.   brew
  75.   catimg
  76.   colorize
  77.   colored-man-pages
  78.   command-not-found
  79.   direnv
  80.   docker
  81.   docker-compose
  82.   fd
  83.   fzf
  84.   git
  85.   gitfast
  86.   git-flow
  87.   golang
  88.   httpie
  89.   kube-ps1
  90.   kubectl
  91.   nmap
  92.   python
  93.   pyenv
  94.   pylint
  95.   osx
  96.   ripgrep
  97.   sudo
  98.   tmux
  99.   urltools
  100.   sbt
  101.   scala
  102.   vi-mode
  103.   vscode
  104. )
  105.  
  106. source $ZSH/oh-my-zsh.sh
  107.  
  108. # User configuration
  109.  
  110. # export MANPATH="/usr/local/man:$MANPATH"
  111.  
  112. # You may need to manually set your language environment
  113. # export LANG=en_US.UTF-8
  114.  
  115. # Preferred editor for local and remote sessions
  116. # if [[ -n $SSH_CONNECTION ]]; then
  117. #   export EDITOR='vim'
  118. # else
  119. #   export EDITOR='mvim'
  120. # fi
  121.  
  122. # Compilation flags
  123. # export ARCHFLAGS="-arch x86_64"
  124.  
  125. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  126. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  127. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  128. # For a full list of active aliases, run `alias`.
  129. #
  130. # Example aliases
  131. # alias zshconfig="mate ~/.zshrc"
  132. # alias ohmyzsh="mate ~/.oh-my-zsh"
  133.  
  134. test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
  135.  
  136. #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
  137. export SDKMAN_DIR="/Users/anujpandey/.sdkman"
  138. [[ -s "/Users/anujpandey/.sdkman/bin/sdkman-init.sh" ]] && source "/Users/anujpandey/.sdkman/bin/sdkman-init.sh"
  139. if [ /usr/local/bin/kubectl ]; then source <(kubectl completion zsh); fi
  140.  
  141. source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
  142.  
  143. # Git
  144. alias g='git s'
  145. alias gap='git ap'
  146. alias gd='git d'
  147. alias gds='git ds'
  148. alias gl='git l'
  149. alias gl='git l --color --oneline --decorate'
  150. alias gs='git s'
  151. alias gaa='git aa'
  152. alias gc='git c'
  153. alias gcm='git commit -m'
  154.  
  155. setp(){
  156.     export http_proxy=http://www-proxy-hqdc.us.oracle.com:80
  157.     export HTTP_PROXY=http://www-proxy-hqdc.us.oracle.com:80
  158.     export https_proxy=http://www-proxy-hqdc.us.oracle.com:80
  159.     export HTTPS_PROXY=http://www-proxy-hqdc.us.oracle.com:80
  160.     export no_proxy=localhost,127.0.0.1,.us.oracle.com,.oraclecorp.com
  161.     export NO_PROXY=localhost,127.0.0.1,.us.oracle.com,.oraclecorp.com
  162.     # imgcat ~/Downloads/Oracle-Open-World-Hero.jpg
  163. }
  164.  
  165. unsp()
  166. {
  167.     unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY no_proxy NO_PROXY
  168. }
  169.  
  170. export TERM=xterm-256color
  171. alias pubip='curl -4 -s icanhazip.com'
  172.  
  173. alias ff="printf \"e[?1004l\""
  174. whoseport() { lsof -i ":$1" | grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn} LISTEN }
  175.  
  176. goset() {
  177.     export GOPATH=~/GO
  178.     export PATH=$PATH:/$GOPATH/bin
  179.     # imgcat ~/Downloads/gopher.png
  180. }
  181.  
  182. kset() {
  183.     alias k=kubectl
  184.     alias kns="kubectl -n kube-system"
  185.     kn(){ kubectl -n $ns "$@";}
  186.     ka(){ kubectl "$@" --all-namespaces;}
  187.     # imgcat ~/Downloads/k8s.jpg
  188. }
  189.  
  190. autoload -U +X bashcompinit && bashcompinit
  191. complete -o nospace -C /usr/local/bin/vault vault
  192. export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
  193.  
  194. function prev() {
  195.   PREV=$(fc -lrn | head -n 1)
  196.   sh -c "pet new `printf %q "$PREV"`"
  197. }
  198.  
  199. #source /usr/local/opt/powerlevel9k/powerlevel9k.zsh-theme
  200. #POWERLEVEL9K_MODE='nerdfont-complete'
  201.  
  202. [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
  203. # /usr/share/fzf/completion.zsh
  204. # /usr/share/fzf/key-bindings.zsh
  205.  
  206. bindkey -e
  207. bindkey '^[[1;9C' forward-word
  208. bindkey '^[[1;9D' backward-word
  209. bindkey '^[b' backward-word
  210. bindkey '^[f' forward-word
  211. bindkey '^[a' beginning-of-line
  212. bindkey '^[e' end-of-line
  213.  
  214. eval "$(direnv hook zsh)"
  215.  
  216. source /Users/anujpandey/.oh-my-zsh/plugins/kube-ps1/kube-ps1.plugin.zsh
  217.  
  218. export SSHPROXY="ProxyCommand=nc -X 5 -x www-proxy.us.oracle.com:80 %h %p"
  219. export PATH=$PATH:~/.poetry/bin:/Users/anujpandey/.cargo/bin/
  220.  
  221. alias sshp="ssh -o ProxyCommand=\"nc -X connect -x www-proxy.us.oracle.com:80 %h %p\""
  222.  
  223. codi() {
  224.    local syntax="${1:-python}"
  225.    shift
  226.    nvim -c \
  227.      "let g:startify_disable_at_vimenter = 1 |\
  228.     set bt=nofile ls=0 noru nonu nornu |\
  229.     hi CodiVirtualText guifg=red
  230.     hi ColorColumn ctermbg=NONE |\
  231.     hi VertSplit ctermbg=NONE |\
  232.     hi NonText ctermfg=0 |\
  233.     Codi $syntax" "$@"
  234. }
  235.  
  236. source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  237.  
  238.  
  239.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement