Skip to content

Instantly share code, notes, and snippets.

@mkhoeini
Last active June 14, 2019 08:22
Show Gist options
  • Save mkhoeini/1eb3d371a3c51fecec94c8fe26defc1e to your computer and use it in GitHub Desktop.
Save mkhoeini/1eb3d371a3c51fecec94c8fe26defc1e to your computer and use it in GitHub Desktop.
zsh setup
zplug "zsh-users/zsh-autosuggestions"
zplug "bhilburn/powerlevel9k", use:powerlevel9k.zsh-theme
zplug "zsh-users/zaw", use:zaw/zaw.zsh
zplug "plugins/gitfast", from:oh-my-zsh
zplug "plugins/httpie", from:oh-my-zsh
zplug "plugins/lol", from:oh-my-zsh
zplug "plugins/git-extras", from:oh-my-zsh
zplug "plugins/osx", from:oh-my-zsh
zplug "plugins/gitignore", from:oh-my-zsh
zplug "plugins/github", from:oh-my-zsh
zplug "plugins/docker", from:oh-my-zsh
zplug "plugins/z", from:oh-my-zsh
zplug "plugins/fasd", from:oh-my-zsh
zplug "plugins/vi-mode", from:oh-my-zsh
zplug "plugins/tmux", from:oh-my-zsh
zplug "plugins/kubectl", from:oh-my-zsh
zplug "plugins/colored-man-pages", from:oh-my-zsh
zplug "zsh-users/zsh-syntax-highlighting", defer:2
zplug "plugins/history-substring-search", from:oh-my-zsh, defer:2
# zplug "b4b4r07/enhancd", use:init.sh
# zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, as:theme
zplug "zpm-zsh/colors"
zplug "zdharma/zsh-diff-so-fancy", as:command, use:bin/git-dsf
zplug "wfxr/forgit", defer:1
zplug "leophys/zsh-plugin-fzf-finder"
zplug "aperezdc/zsh-fzy"
zplug "oldratlee/hacker-quotes"
zplug "zsh-users/zaw", use:zaw.zsh
zplug "scmbreeze/scm_breeze"
zplug "psprint/zsh-navigation-tools"
# The following lines were added by compinstall
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*'
zstyle :compinstall filename '/Users/mohammadk/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory autocd beep extendedglob
bindkey -v
# End of lines configured by zsh-newuser-install
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/.bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
# export ZSH="/Users/mkhoeini/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# ZSH_THEME="robbyrussell"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
# plugins=()
# source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias b='brew'
alias bi='b install'
alias bs='b search'
alias bc='b cask'
alias bci='bc install'
alias bcs='bc search'
# alias l="exa -lahTL 2 --group-directories-first --git"
alias l="lsd -la"
alias kg="kubectl get"
alias kd="kubectl describe"
alias -g ...='../..'
alias -g ....='../../..'
alias -g .....='../../../..'
alias -g L='| less -R'
alias -g G='| grep -i'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=""
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=" \uf120 "
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR="\uE0C6"
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR="\uE0C7"
POWERLEVEL9K_MODE='nerdfont-complete'
source ~/.zplug/init.zsh
zplug check || zplug install
zplug load
# Configs
export ZPLUG_FILTER=fzy:$ZPLUG_FILTER
if [ $commands[rustc] ]; then
export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/src
fi
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:/usr/local/opt/ruby/bin:$PATH"
export NVM_DIR=$HOME/.nvm
fpath+=/usr/local/share/zsh-completions
fpath+=${ZDOTDIR:-~}/.zsh_functions
if [ -f ~/.secrets ]; then source ~/.secrets; fi
if [ $commands[rbenv] ]; then source <(rbenv init -); fi
if [ -f "$HOME/.kiex/scripts/kiex" ]; then source "$HOME/.kiex/scripts/kiex"; fi
if [ $commands[direnv] ]; then source <(direnv hook zsh); fi
if [ $commands[helm] ]; then source <(helm completion zsh); fi
if [ $commands[minikube] ]; then source <(minikube completion zsh); fi
if [ -s "$NVM_DIR/nvm.sh" ]; then source $NVM_DIR/nvm.sh; fi
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment