commit a1f8fa897334697c658bfb6dc3e28ef13ba84562
parent 4ef887fd98182d55922c1207a9466769e9b11772
Author: Sven Möller <sven-moeller@outlook.de>
Date: Mon, 10 Jan 2022 22:58:17 +0100
Add edit function
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/bin/.local/bin/bm b/bin/.local/bin/bm
@@ -83,11 +83,17 @@ to_html () {
echo "</ul>"
}
+edit () {
+ cat > /dev/null
+ "$EDITOR" "$BM_DIR/$1"
+}
+
foo () {
case "$1" in
-r) random ;;
-h) to_html $2 ;;
-l) cat ;;
+ -e) edit $2 ;;
*) interactive $2 ;;
esac
}