Last active
August 12, 2016 16:52
-
-
Save bobeckert/affd733a68c305af3c0103ab4ace3a4a to your computer and use it in GitHub Desktop.
fish function to open a markdown file as a new chrome tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mdopen | |
set tempfile "/tmp/temp_"(date +%s)".html" | |
pandoc $argv > $tempfile | |
open -a 'Google Chrome' $tempfile | |
sleep 2s | |
rm $tempfile | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires pandoc, which is available via Homebrew:
brew install pandoc
.