3 ms·
umedit with templating: function umedit() { mkdir -p ~/.notes if [ ! -f ~/.notes/$1.md ]; then echo "% $(echo $1 | tr '[:lower:
by citruscomputing 8y ago
umedit with templating:
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
}