From 89578784957396e81c82f3b4ac06959a2d73dd27 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 12 Jul 2016 10:39:02 -0400 Subject: [PATCH] Reorganizes home directory to accomodate git repo --- .vimrc | 1 + .w_aliases.sh | 25 ++++++++++++++++++++ .w_functions.sh | 31 ++++++++++++++++++++++++ .zsh_profile | 63 ++++--------------------------------------------- 4 files changed, 62 insertions(+), 58 deletions(-) create mode 100644 .w_aliases.sh create mode 100644 .w_functions.sh diff --git a/.vimrc b/.vimrc index 10739ec29..926d70f90 100644 --- a/.vimrc +++ b/.vimrc @@ -4,3 +4,4 @@ set tabstop=2 set expandtab set shiftwidth=2 colorscheme murphy + diff --git a/.w_aliases.sh b/.w_aliases.sh new file mode 100644 index 000000000..c427af58e --- /dev/null +++ b/.w_aliases.sh @@ -0,0 +1,25 @@ +alias ll="ls -l" + +alias catn="cat -n" + +alias egrep="egrep --color" + +alias grep="egrep" + +alias c="clear" + +alias vi="vim" + +alias find="find -E" + +alias dir='find . -maxdepth 1 -type d -regex "\.\/[^.].+"' + +# if pygmentize isn't installed run... +# sudo pip install pygments +# colorizes syntax of files +alias ccat="pygmentize -g" + +# view the Unix directory stack as maintained through +# pushd and popd commands +alias wdirs='dirs | tr " " "\n" | sort -r' + diff --git a/.w_functions.sh b/.w_functions.sh new file mode 100644 index 000000000..e1a76bd3f --- /dev/null +++ b/.w_functions.sh @@ -0,0 +1,31 @@ +functon npms() { + clear; + npm start; +} + +# custom js functions +source $HOME/pc_settings/.js_to_bash.sh + +# custom git functions +source $HOME/pc_settings/.git_functions.sh + +# custom bash helpers functions +source $HOME/pc_settings/.misc_functions.sh + +# 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 +} + +# 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 +} + diff --git a/.zsh_profile b/.zsh_profile index 667c4a4b7..f56d5f1c2 100644 --- a/.zsh_profile +++ b/.zsh_profile @@ -5,37 +5,11 @@ echo "Welcome back, $USER" # use vi bindings for terminal input set -o vi -# BEGIN: aliases -alias ll="ls -l" -alias catn="cat -n" +# aliases +source $HOME/pc_settings/.w_aliases.sh -alias egrep="egrep --color" -alias grep="egrep" - -alias c="clear" - -alias vi="vim" - -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 "\.\/[^.].+"' - -# view the Unix directory stack as maintained through -# pushd and popd commands -alias wdirs='dirs | tr " " "\n" | sort -r' -# END: aliases - -# BEGIN: functions -functon npms() { - clear; - npm start; -} -# END: functions +# functions +source $HOME/pc_settings/.w_functions.sh # BEGIN: bindkeys bindkey "^R" history-incremental-search-backward @@ -43,40 +17,13 @@ bindkey "^R" history-incremental-search-backward bindkey -M viins 'jj' vi-cmd-mode # END: bindkeys - # export docker env variables # 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)" -# custom js functions -source ~/.js_to_bash.sh - -# custom git functions -source ~/.git_functions.sh - -# custom bash helpers functions -source ~/.misc_functions.sh - -# 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 -} - -# 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 -} - # run cmatrix command for 3 seconds before exiting -#. $HOME/.matrix_intro.sh +#. $HOME/pc_settings/.matrix_intro.sh # syntax highlighting for CLI; if not installed, run the following command # brew install zsh-syntax-highlighting