From 64f40be0faa5d0833b6e3f3004e057fccf0b35f9 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Thu, 27 Jul 2017 10:07:11 +0100 Subject: [PATCH] Add searchhtml function and createLetter function --- config/oh-my-zsh/functions.zsh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/config/oh-my-zsh/functions.zsh b/config/oh-my-zsh/functions.zsh index e6670dd8..44ed0486 100644 --- a/config/oh-my-zsh/functions.zsh +++ b/config/oh-my-zsh/functions.zsh @@ -23,6 +23,21 @@ function cdlc() { } alias cd="cdlc" +function createLetter(){ + if [ "$1" ]; then + if [ "$2" ]; then + newFile="$2" + else + newFile="$1" + newFile="${newFile%.*}.pdf" + fi + pandoc --template template-letter.tex $1 -o $newFile + else + echo "Oops. You need to suply a file" + return 1 + fi +} + #Takes you to the aquarius theme function aquarius() { public_html=${PWD%/public_html*}/public_html @@ -102,3 +117,6 @@ searchcss() { searchphp() { grep -r -i -n --color="always" --include=\*.{php,phtml} "$1" . } +searchhtml() { + grep -r -i -n --color="always" --include=\*.{html,htm} "$1" . +}