Created
November 13, 2019 20:15
-
-
Save waynegraham/9458ba697647ba9897a66054a868c416 to your computer and use it in GitHub Desktop.
ZSH custom env
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
#! /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