Add usaco interactive REPL with current-problem context

Co-Authored-By: Claude Code <[email protected]>
This commit is contained in:
2026-09-24 13:12:37 +01:00
co-authored by Claude Code
parent 26a9c969bd
commit 1b78b35876
3 changed files with 186 additions and 0 deletions
+9
View File
@@ -1,6 +1,14 @@
#!/usr/bin/env bash
# usaco - manage USACO problems
# Usage:
# usaco i Interactive mode: holds a current problem so commands
# drop the name (aliases: interactive, repl)
# s <name> select a problem (bare name works too)
# s show the current problem
# none clear the selection
# r / t / e act on the current problem
# !cmd run a shell command in the problem dir
# q quit
# usaco new <name> [io-name] [--url <link>]
# Create solving/<name> from template.cpp
# (io-name sets freopen filenames, defaults to <name>)
@@ -41,6 +49,7 @@ usage() { awk 'NR>1 { if (!/^#/) exit; sub(/^# ?/,""); print }' "$0"; exit 1; }
cmd="${1:-}"; shift || true
case "$cmd" in
interactive|i|repl) cmd=interactive ;;
new|n) cmd=new ;;
run|r) cmd=run ;;
build|b) cmd=build ;;