task

creates a plain-text task file in the current directory
git clone git://brookjeynes.dev/bjeynes/task.git
Log | Files | Refs | README | LICENSE

commit 36003d104ee826cfa33f228b2811f0aa8501fa3e
parent 7a877d52980a67110336240fed83a13fc9a3cc8f
Author: brookjeynes <me@brookjeynes.dev>
Date:   Fri, 19 Jun 2026 10:21:55 +1000

ci: update makefile

Signed-off-by: brookjeynes <me@brookjeynes.dev>

Diffstat:
D.gitignore | 1-
MMakefile | 32++++++++++++++++++++++++--------
MREADME | 31++++++++++++++++++++++---------
Rmain.c -> task.c | 0
4 files changed, 46 insertions(+), 18 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1 +0,0 @@ -build/* diff --git a/Makefile b/Makefile @@ -1,12 +1,28 @@ -.PHONY: build clean +NAME = task -CC := gcc -CFLAGS := -Wall -Wextra -Wpedantic -std=c11 -BUILD_DIR := build +TASK_CFLAGS = ${CFLAGS} +TASK_LDFLAGS = ${LDFLAGS} -build: - mkdir -p ./$(BUILD_DIR) - $(CC) $(CFLAGS) -o ./$(BUILD_DIR)/task main.c +SRC = \ + task.c +BIN = \ + task +DOC = \ + LICENSE\ + README + +all: ${BIN} + +.o: + ${CC} -o $@ ${LDFLAGS} + +.c.o: + ${CC} -o $@ -c $< ${TASK_CFLAGS} + +task: task.o + ${CC} -o $@ task.o ${TASK_LDFLAGS} clean: - rm -rf ./$(BUILD_DIR) + rm -f ${BIN} + +.PHONY: all clean diff --git a/README b/README @@ -1,21 +1,34 @@ task ==== -task creates a plain-text task file in the current directory. +Create a plain-text task file in the current directory. -Build: +The task title becomes the filename. Spaces, slashes, backslashes, and leading +dots are replaced with underscores. - make build +If VISUAL or EDITOR is set, task opens the new file in that editor. -Usage: - task "Call Mom" - task -p A "Call Mom" @phone +family +Usage +----- -The task title becomes the filename. Spaces, slashes, backslashes, and leading -dots are replaced with underscores. + $task "Call Mom" + $task -p A "Call Mom" @phone +family + + +Dependencies +------------ + +- C compiler +- libc +- libgit2 + + +Build +----- + + $ make -If VISUAL or EDITOR is set, task opens the new file in that editor. Code is licensed under 0BSD. manifesto.txt is adapted from todo.txt and is distributed under GPLv3: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/main.c b/task.c