From 97463f6f5d86855eba39896fc838f3e2b0f0a295 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 10 Aug 2016 15:56:36 -0700 Subject: [bash] function to preview markdown New bash function to render a preview of a markdown file. Closes #8. --- bashrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bashrc b/bashrc index 5bcf568..ab12158 100644 --- a/bashrc +++ b/bashrc @@ -46,3 +46,10 @@ alias gonest="ssh -K nest.smfc.twitter.com" [ -d "/opt/twitter/opt/go/libexec/bin" ] && PATH="/opt/twitter/opt/go/libexec/bin:${PATH}" [ -d "/opt/twitter/bin" ] && PATH="/opt/twitter/bin:${PATH}" [ -f /opt/twitter/rvm/scripts/rvm ] && source /opt/twitter/rvm/scripts/rvm + +md_prev() { + FILE="${1}" + pandoc -f markdown_github \ + -c https://goo.gl/OVmlwT \ + --self-contained "${FILE}" > /tmp/md_prev && open /tmp/md_prev +} -- cgit 1.4.1