Skip to content

Instantly share code, notes, and snippets.

@waynegraham
Created November 13, 2019 20:15
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 waynegraham/9458ba697647ba9897a66054a868c416 to your computer and use it in GitHub Desktop.
Save waynegraham/9458ba697647ba9897a66054a868c416 to your computer and use it in GitHub Desktop.
ZSH custom env
#! /bin/zsh
# Add commonly used folders to $PATH
export PATH="$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
for bindir in $HOME/local/bin $HOME/bin; do
if [ -d $bindir ]; then
PATH=$PATH:${bindir}
fi
done
# Specify default editor. Possible values: vim, nano, ed etc.
export EDITOR=vim
# File search functions
function f() { find . -iname "*$1*" ${@:2} }
function r() { grep "$1" ${@:2} -R . }
# Create a folder and move into it in one command
function mkcd() { mkdir -p "$@" && cd "$_"; }
# Example aliases
alias cppcompile='c++ -std=c++11 -stdlib=libc++'
alias g='git'
alias gs='git status'
alias mamp='cd /Applications/MAMP/htdocs'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment