Add "open" function to fork xdg-open
[khome.git] / home / bin / drafts_prepend
1 #! /bin/bash
2
3 set -euo pipefail
4
5 FILE="$HOME/doc/drafts/drafts.md"
6
7 bar() {
8 seq -s - 80 | sed -E 's/[0-9]+//g'
9 }
10
11 header() {
12 printf 'untitled\n'
13 bar
14 date +'started: %Y-%m-%d %H:%M:%S %z'
15 printf '\n\n'
16 }
17
18 (header && cat "$FILE") | sponge "$FILE" # sponge is in moreutils package
This page took 0.056628 seconds and 4 git commands to generate.