Created
August 10, 2019 01:09
-
-
Save Saghen/5aabbe230a355c7cfa77fe632ee15971 to your computer and use it in GitHub Desktop.
Zshrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload -Uz compinit | |
if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then | |
compinit; | |
else | |
compinit -C; | |
fi; | |
# 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="/home/liam/.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="gitster" | |
# 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 automatically update without prompting. | |
# DISABLE_UPDATE_PROMPT="true" | |
# Uncomment the following line to change how often to auto-update (in days). | |
# export UPDATE_ZSH_DAYS=13 | |
# Uncomment the following line if pasting URLs and other text is messed up. | |
# DISABLE_MAGIC_FUNCTIONS=true | |
# 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=(git) | |
#source $ZSH/oh-my-zsh.sh | |
# User configuration | |
# Antibody | |
# Enable autocompletions | |
autoload -Uz compinit | |
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null) | |
if [ $(date +'%j') != $updated_at ]; then | |
compinit -i | |
else | |
compinit -C -i | |
fi | |
zmodload -i zsh/complist | |
# Save history so we get auto suggestions | |
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=10000 | |
SAVEHIST=$HISTSIZE | |
# Options | |
setopt auto_cd # cd by typing directory name if it's not a command | |
setopt auto_list # automatically list choices on ambiguous completion | |
setopt auto_menu # automatically use menu completion | |
setopt always_to_end # move cursor to end if word had one match | |
setopt hist_ignore_all_dups # remove older duplicate entries from history | |
setopt hist_reduce_blanks # remove superfluous blanks from history items | |
setopt inc_append_history # save history entries as soon as they are entered | |
setopt share_history # share history between different instances | |
setopt interactive_comments # allow comments in interactive shells | |
# Improve autocompletion style | |
zstyle ':completion:*' menu select # select completions with arrow keys | |
zstyle ':completion:*' group-name '' # group results by category | |
zstyle ':completion:::::' completer _expand _complete _ignored _approximate # enable approximate matches for completion | |
# Load antibody plugin manager | |
source <(antibody init) | |
# Plugins | |
antibody bundle zdharma/fast-syntax-highlighting | |
antibody bundle zsh-users/zsh-autosuggestions | |
antibody bundle zsh-users/zsh-history-substring-search | |
antibody bundle zsh-users/zsh-completions | |
antibody bundle marzocchi/zsh-notify | |
antibody bundle buonomo/yarn-completion | |
antibody bundle robbyrussell/oh-my-zsh path:plugins/autojump | |
# Keybindings | |
bindkey '^[[A' history-substring-search-up | |
bindkey '^[[B' history-substring-search-down | |
bindkey '^[[3~' delete-char | |
bindkey '^[3;5~' delete-char | |
# Theme | |
SPACESHIP_PROMPT_ORDER=( | |
user # Username section | |
dir # Current directory section | |
host # Hostname section | |
git # Git section (git_branch + git_status) | |
hg # Mercurial section (hg_branch + hg_status) | |
exec_time # Execution time | |
line_sep # Line break | |
vi_mode # Vi-mode indicator | |
jobs # Background jobs indicator | |
exit_code # Exit code section | |
char # Prompt character | |
) | |
SPACESHIP_PROMPT_ADD_NEWLINE=false | |
SPACESHIP_CHAR_SYMBOL="#" | |
SPACESHIP_CHAR_SUFFIX=" " | |
antibody bundle denysdovhan/spaceship-prompt | |
# Path | |
export PATH=/home/liam/.nvm/versions/node/v12.6.0/bin:/home/liam/bin:/usr/local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/opt/intel/mediasdk/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl | |
source /usr/share/nvm/init-nvm.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment