by susam · 8y ago · 0 comments
umedit() { mkdir -p ~/notes; vim ~/notes/"$1.txt"; }
um() { less ~/notes/"$1.txt"; }sphinx.builders.manpage: http://www.sphinx-doc.org/en/master/_modules/sphinx/builders...
umedit() { mkdir -p ~/notes; vim ~/notes/"$1.md" }
um() { pandoc -s -t man ~/notes/"$1.md" | tbl | groff -Wall -mtty-char -man -Tascii -c | less -R }
Not sure if pandoc creates tbl tables ;). function mdless() {
pandoc -s -f markdown -t man $1 | groff -T utf8 -man | less
}
umedit() { mkdir -p ~/.notes; vim ~/.notes/$1; }
um() { mdless ~/.notes/"$1"; }
umls() { ls ~/.notes }
This way I can write the notes in markdown and view them as such in `less`.function mdless pandoc -s -f markdown -t man $argv[1] | groff -T utf8 -man | less -c end function umedit mkdir -p ~/.notes; nvim ~/.notes/$argv[1]; end function um mdless ~/.notes/"$argv[1]" end function umls ls ~/.notes/ end
(reminder, to make them permanent just: `funcsave mdless umedit um umls`)
function umedit() {
mkdir -p ~/.notes
if [ ! -f ~/.notes/$1.md ]; then
echo "% $(echo $1 | tr '[:lower:]' '[:upper:]')(shell) Um Pages | Um Page" >> ~/.notes/$1.md
echo "\n# NAME\n$1 - $(whatis $1 2> /dev/null | cut -d '-' -f 2 | awk '{$1=$1};1')\n\n# COMMANDS" >> ~/.notes/$1.md
fi
vim ~/.notes/$1.md
}I can share my man pages with git/github, but nobody will notice them, nobody will fix my spelling errors or contribute additional information.
Is there something like wiki, but for man pages?