From 65244696d0a0676fd8a814cc1bbad584a76798ac Mon Sep 17 00:00:00 2001 From: Joursoir Date: Fri, 13 Oct 2023 19:47:00 +0300 Subject: bashrc: add shortcut for markdown preview --- .bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.bashrc b/.bashrc index 57f79fb..6229539 100644 --- a/.bashrc +++ b/.bashrc @@ -19,6 +19,12 @@ unset file # Add tab completion [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion +# Shortcut for markdown preview +md() { + pandoc -f markdown -t html \ + -o /tmp/md-preview.html "$1" && firefox /tmp/md-preview.html +} + # Use gpg-agent like SSH agent (https://wiki.archlinux.org/title/GnuPG#SSH_agent) unset SSH_AGENT_PID if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then -- cgit v1.2.3-18-g5258