Skip to content

Instantly share code, notes, and snippets.

@anthonyclarka2
Last active August 9, 2019 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonyclarka2/7410aa33f1bc4ad4ffea7e7a67ec9bcb to your computer and use it in GitHub Desktop.
Save anthonyclarka2/7410aa33f1bc4ad4ffea7e7a67ec9bcb to your computer and use it in GitHub Desktop.
# Basic .zshrc for use on WSL (Windows Subsystem for Linux)
# https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet
export ZSH="/home/aclark/.oh-my-zsh"
# Outputs: "fedora :: ~ »"
ZSH_THEME="afowler"
# Check once a month for oh-my-zsh updates
export UPDATE_ZSH_DAYS=28
# Show visual feedback when autocompleting something
COMPLETION_WAITING_DOTS="true"
# use ISO 8601 for dates in history
HIST_STAMPS="yyyy-mm-dd"
plugins=()
source $ZSH/oh-my-zsh.sh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
[ -f ~/.go.zsh ] && source ~/.go.zsh
# Add a blank line before the command prompt:
precmd() { print "" }
# $commands is a hash table of every command in your path
# http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#index-commands
# so "ls $commands[kubectl]" outputs "/usr/local/bin/kubectl" on my system.
if [ $commands[kubectl] ]; then source <(kubectl completion zsh); fi
# Only allow unique entries in the PATH variable
typeset -U path
# Easier to read PATH variable modification:
path+=(
'/home/aclark/.cargo/bin'
'/home/aclark/bin'
'/home/aclark/go/bin'
)
# Next-gen(!) ZSH plugin manager
source ~/.zplug/init.zsh
# Each of these plugins is a github repo
# Go to https://github.com/${PLUGIN_NAME} for further details
# Example: https://github.com/junegunn/fzf
zplug "zdharma/fast-syntax-highlighting", defer:2
zplug "plugins/git", from:oh-my-zsh
zplug "urbainvaes/fzf-marks"
zplug "zsh-users/zsh-completions"
zplug "zsh-users/zsh-autosuggestions"
zplug "rupa/z", use:z.sh
zplug "supercrabtree/k"
# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
# Then, source plugins and add commands to $PATH
zplug load
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment