2016-06-24 19:34:33 +02:00
export PATH=$HOME/bin:/opt/local/bin:/opt/local/sbin:$PATH
2016-05-04 20:11:38 +02:00
2016-06-28 04:59:20 +02:00
echo "Welcome back, $USER"
2016-05-04 20:11:38 +02:00
# use vi bindings for terminal input
set -o vi
# BEGIN: aliases
alias ll="ls -l"
alias catn="cat -n"
alias egrep="egrep --color"
alias grep="egrep"
alias c="clear"
alias vi="vim"
2016-06-28 04:59:20 +02:00
alias find="find -E"
# if pygmentize isn't installed run...
# sudo pip install pygments
# colorizes syntax of files
alias ccat="pygmentize -g"
alias dir='find . -maxdepth 1 -type d -regex "\.\/[^.].+"'
2016-07-12 16:11:46 +02:00
# view the Unix directory stack as maintained through
# pushd and popd commands
alias wdirs='dirs | tr " " "\n" | sort -r'
2016-05-04 20:11:38 +02:00
# END: aliases
# BEGIN: functions
functon npms() {
clear;
npm start;
}
# END: functions
2016-06-28 04:59:20 +02:00
# BEGIN: bindkeys
2016-05-04 20:11:38 +02:00
bindkey "^R" history-incremental-search-backward
2016-06-28 04:59:20 +02:00
bindkey -M viins 'jj' vi-cmd-mode
# END: bindkeys
2016-05-04 20:11:38 +02:00
# export docker env variables
2016-06-24 19:34:33 +02:00
# re-enable this line when using docker otherwise you will receive
# a TLS error since docker-machine won't be running
# eval "$(docker-machine env default)"
2016-05-04 20:11:38 +02:00
# custom js functions
source ~/.js_to_bash.sh
# custom git functions
source ~/.git_functions.sh
2016-07-12 16:11:46 +02:00
# custom bash helpers functions
source ~/.misc_functions.sh
2016-05-04 20:11:38 +02:00
# generates placeholder content for FE work
function lorem {
text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
echo $text
}
# generates lorem and adds to pasteboard
function loremcp {
lorem | pbcopy
}
2016-06-24 19:34:33 +02:00
2016-07-12 16:11:46 +02:00
# searches all PATH directories for a keyword
function wsearchpath {
echo $PATH | tr ':' '\n' | xargs -I {} find {} -type f -perm +111 -maxdepth 1 -name "*${1}*" -print | xargs basename
}
2016-06-24 19:34:33 +02:00
# run cmatrix command for 3 seconds before exiting
#. $HOME/.matrix_intro.sh
# syntax highlighting for CLI; if not installed, run the following command
# brew install zsh-syntax-highlighting
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh