From 06178e66dda5f84dfd9a0d0c128142382e14bbef Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 12 Jul 2016 10:11:46 -0400 Subject: [PATCH] Adds alias for dirs command --- .zsh_profile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.zsh_profile b/.zsh_profile index 24760627c..667c4a4b7 100644 --- a/.zsh_profile +++ b/.zsh_profile @@ -24,6 +24,10 @@ alias find="find -E" 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 @@ -51,6 +55,9 @@ 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." @@ -63,6 +70,11 @@ 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