From 9da56b0622565229f8615e2ce0ca6a7dbdd879c8 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Sat, 18 Apr 2026 12:14:14 +0200 Subject: [PATCH] scripts: rename s/job -> b/job; b/q and b/sched wrap b/job Co-Authored-By: Claude Sonnet 4.6 --- 9p | 2 +- mkfile | 2 +- scripts/README.md | 22 +++++++++++----------- scripts/{s => b}/job | 2 +- scripts/b/q | 2 +- scripts/b/sched | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) rename scripts/{s => b}/job (98%) diff --git a/9p b/9p index 0c3f4e8..4a42002 160000 --- a/9p +++ b/9p @@ -1 +1 @@ -Subproject commit 0c3f4e8e4acd788bacac42b585ead262ab20a46c +Subproject commit 4a42002a0f594f2d11103922b1995b139b97675b diff --git a/mkfile b/mkfile index 880e851..bd5f518 100755 --- a/mkfile +++ b/mkfile @@ -41,9 +41,9 @@ scripts:V: mkdir -p $HOME/.config/ollie/scripts/s $HOME/.config/ollie/scripts/b $HOME/.config/ollie/scripts/u chmod 755 $HOME/.config/ollie/scripts/u cp -f scripts/s/sh $HOME/.config/ollie/scripts/s/sh - cp -f scripts/s/job $HOME/.config/ollie/scripts/s/job cp -f scripts/s/ls $HOME/.config/ollie/scripts/s/ls cp -f scripts/s/kill $HOME/.config/ollie/scripts/s/kill + cp -f scripts/b/job $HOME/.config/ollie/scripts/b/job cp -f scripts/b/q $HOME/.config/ollie/scripts/b/q cp -f scripts/b/sched $HOME/.config/ollie/scripts/b/sched cp -f scripts/u/optimize $HOME/.config/ollie/scripts/u/optimize diff --git a/scripts/README.md b/scripts/README.md index 47c6af9..252459a 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -8,7 +8,7 @@ mounted filesystem under `s/`, so they are available without any `$PATH` changes ```sh exec $OLLIE/s/sh # start interactive shell -$OLLIE/s/job "my prompt" # batch job (foreground) +$OLLIE/b/job "my prompt" # submit and wait for a batch job $OLLIE/b/q "my prompt" # foreground one-shot query $OLLIE/b/sched "my prompt" # background job; prints b/ path $OLLIE/s/ls # list sessions @@ -68,15 +68,15 @@ s/sh -session 1745123456-abc # attach to a specific session --- -## s/job +## b/job Non-interactive one-shot query. Submits a prompt to `b/new`, waits for completion, prints the result to stdout, then removes the job. Exit code is non-zero on failure. ``` -s/job [flags] [prompt...] -echo "prompt" | s/job [flags] +b/job [flags] [prompt...] +echo "prompt" | b/job [flags] ``` **Flags** @@ -95,11 +95,11 @@ echo "prompt" | s/job [flags] **Examples** ```sh -s/job "Summarize this repo in one sentence" -cat error.log | s/job "What is causing this error?" -s/job -output json "List the top 3 risks as JSON" -s/job -parallel 4 -keep "Write a haiku about filesystems" -s/job -backend ollama -model qwen3:8b "Explain this function" < main.go +b/job "Summarize this repo in one sentence" +cat error.log | b/job "What is causing this error?" +b/job -output json "List the top 3 risks as JSON" +b/job -parallel 4 -keep "Write a haiku about filesystems" +b/job -backend ollama -model qwen3:8b "Explain this function" < main.go ``` With `-parallel N` and N > 1, results are separated by `=== {id} ===` headers. @@ -128,14 +128,14 @@ s/kill ## b/q -Foreground one-shot query; thin wrapper around `s/job`. Output goes to stdout. +Foreground one-shot query; thin wrapper around `b/job`. Output goes to stdout. ``` b/q [flags] [prompt...] echo "prompt" | b/q [flags] ``` -Accepts the same flags as `s/job`. +Accepts the same flags as `b/job`. --- diff --git a/scripts/s/job b/scripts/b/job similarity index 98% rename from scripts/s/job rename to scripts/b/job index eed6854..8d234dd 100755 --- a/scripts/s/job +++ b/scripts/b/job @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# oq: non-interactive ollie query via b/ namespace. +# b/job: non-interactive ollie query via b/ namespace. # # Usage: oq [flags] [prompt...] # echo "prompt" | oq [flags] diff --git a/scripts/b/q b/scripts/b/q index 42232d3..75b1fac 100644 --- a/scripts/b/q +++ b/scripts/b/q @@ -20,4 +20,4 @@ cmd=${0##*/} if [ $# -eq 0 ] && [ -t 0 ]; then printf '%s: prompt required: pass as arguments or pipe via stdin\n' "$cmd" >&2; exit 1 fi -exec "${0%/*}/../s/job" "$@" +exec "${0%/*}/job" "$@" diff --git a/scripts/b/sched b/scripts/b/sched index 0c27aff..f823454 100644 --- a/scripts/b/sched +++ b/scripts/b/sched @@ -21,6 +21,6 @@ if [ $# -eq 0 ] && [ -t 0 ]; then printf '%s: prompt required: pass as arguments or pipe via stdin\n' "$cmd" >&2; exit 1 fi OLLIE=${OLLIE:-$HOME/mnt/ollie} -"${0%/*}/../s/job" -bg "$@" | while IFS= read -r id; do +"${0%/*}/job" -bg "$@" | while IFS= read -r id; do [ -n "$id" ] && printf '%s/b/%s\n' "$OLLIE" "$id" done