From: Mark Szymanski Date: Sun, 27 Feb 2011 15:49:51 +0000 (-0600) Subject: Added lsgrep() function and comments for mkcd() function X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=e787f2653ea7a78bdcb4f8268d07fb2c789e99d0;p=common%2Fbash_it.git Added lsgrep() function and comments for mkcd() function --- diff --git a/plugins/base.plugin.bash b/plugins/base.plugin.bash index 02c0104..7f4ba2f 100644 --- a/plugins/base.plugin.bash +++ b/plugins/base.plugin.bash @@ -11,11 +11,19 @@ function myip { echo "Your public IP is: ${bold_green} $res ${normal}" } +# Make a directory and immediately 'cd' into it + function mkcd(){ mkdir -p "$*" cd "$*" } +# Search through directory contents with grep + +function lsgrep(){ + ls | grep "$*" +} + # View man documentation in Preview pman () { man -t "${1}" | open -f -a $PREVIEW