Last active
April 29, 2018 06:13
-
-
Save KevinBatdorf/f3dc5f132817bfd4c0365815d8880b5a to your computer and use it in GitHub Desktop.
.zshrc Win10
This file contains 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
# SOME NOTES | |
# | |
# Install apt-cyg after cygwin | |
# | |
# Make sure to install packages from cygwin instead of choco | |
# cURL, for example, won't work. Also, install PHP with extensions. | |
# php php-json php-mbstring php-phar php-posix php-zip | |
export ZSH=/home/Kevin/.oh-my-zsh | |
ZSH_THEME="robbyrussell" | |
# ZSH_THEME="jnrowe" | |
# ZSH_THEME="sorin" | |
plugins=(git laravel5 rsync gulp colorize zsh-syntax-highlighting) | |
# Do not record an event starting with a space | |
setopt HIST_IGNORE_SPACE | |
# Share history between sessions | |
setopt SHARE_HISTORY | |
# Write to the history file immediately, not when the shell exits | |
setopt INC_APPEND_HISTORY | |
# Auto changes to a directory without typing "cd" | |
setopt AUTO_CD | |
source $ZSH/oh-my-zsh.sh | |
# | |
# Alias | |
# | |
alias node='/cygdrive/c/"Program Files"/nodejs/node' | |
alias npme='/cygdrive/c/"Program Files"/nodejs/npm' | |
# Make dir and go inside | |
mkcd() { | |
mkdir -p "$*"; cd "$*" | |
} | |
# Lazy Git | |
function lg() { | |
git status -s | |
git add . | |
git commit -a -m "$1" | |
git push | |
} | |
# Version Control this file | |
# gist -p (secret) -o (open) -a (anon) -d (include desc) "desc" ~/.file | |
alias gistzsh="gist -u f3dc5f132817bfd4c0365815d8880b5a ~/.zshrc" | |
alias gistafter="gist -u f91cf59e4d0582ee685e9dbbb928c973 ~/Homestead/after.sh" | |
# Allows usage of apm in Windows | |
alias apm='apm.cmd' | |
# call homestead from anywhere | |
function hs() { | |
( cd ~/Homestead && vagrant $* ) | |
} | |
# bash completion for the `wp` command | |
autoload bashcompinit | |
bashcompinit | |
_wp_complete() { | |
local OLD_IFS="$IFS" | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
IFS=$'\n'; # want to preserve spaces at the end | |
local opts="$(wp cli completions --line="$COMP_LINE" --point="$COMP_POINT")" | |
if [[ "$opts" =~ \<file\>\s* ]] | |
then | |
COMPREPLY=( $(compgen -f -- $cur) ) | |
elif [[ $opts = "" ]] | |
then | |
COMPREPLY=( $(compgen -f -- $cur) ) | |
else | |
COMPREPLY=( ${opts[*]} ) | |
fi | |
IFS="$OLD_IFS" | |
return 0 | |
} | |
complete -o nospace -F _wp_complete wp | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment