Add usaco interactive REPL with current-problem context
Co-Authored-By: Claude Code <[email protected]>
This commit is contained in:
@@ -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 ;;
|
||||
|
||||
Reference in New Issue
Block a user