this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

zsh: markdown preview update

+9 -2
+9 -2
zsh/zshenv
··· 47 47 # Expects the [markdown viewer](https://github.com/simov/markdown-viewer) 48 48 # FF extension to be installed. 49 49 function mdp { 50 - local file="${PWD}/${1}" 51 - # if $file does not end with `.md`, bail 50 + local file="${1}" 51 + 52 + # If it isn't already an absolute path, make it one 53 + if [[ ! "$file" == "/"* ]]; then 54 + file="${PWD}/${file}" 55 + fi 56 + 57 + # If it isn't a markdown file, bail 52 58 if [[ ! "$file" == *".md" ]]; then 53 59 echo "Must provide a markdown file" 54 60 exit 1 55 61 fi 62 + 56 63 firefox "${file}" 57 64 } 58 65