aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2023-10-13 19:47:00 +0300
committerJoursoir <chat@joursoir.net>2023-11-04 16:12:10 +0300
commit65244696d0a0676fd8a814cc1bbad584a76798ac (patch)
tree00f969f68dc8dbc3002019f062e251c30317998f
parent1b3ab5234bd3235c84313c989f688d4f1e191262 (diff)
downloaddotfiles-65244696d0a0676fd8a814cc1bbad584a76798ac.tar.gz
dotfiles-65244696d0a0676fd8a814cc1bbad584a76798ac.tar.bz2
dotfiles-65244696d0a0676fd8a814cc1bbad584a76798ac.zip
bashrc: add shortcut for markdown preview
-rw-r--r--.bashrc6
1 files changed, 6 insertions, 0 deletions
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