From 688779fbc61d48046199d1f45549720e289ce417 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 21 May 2026 18:56:19 +0200 Subject: Added support for user generated shell scripts: - create a director with shell scripts - call them within the chat with @ - four sample scripts --- cmd/todo | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 cmd/todo (limited to 'cmd/todo') diff --git a/cmd/todo b/cmd/todo new file mode 100755 index 0000000..7fb796b --- /dev/null +++ b/cmd/todo @@ -0,0 +1,16 @@ +#!/bin/sh +# @todo - print the shared to-do list +# +# The list lives in todo.md next to this script (cmd/todo.md). Edit that +# file directly - on the server or by scp - to change it; @todo only +# reads it, and the next call reflects the edit (no restart). + +file="$(dirname "$0")/todo.md" + +if [ ! -f "$file" ]; then + echo "todo: no list yet - create $file" +elif [ ! -s "$file" ]; then + echo "todo: the list is empty" +else + cat "$file" +fi -- cgit v1.3