Module
poke/cli
src/poke/cli.pookaReview the things that changed before calling them expected.
The same entry point works through pooka run or an exported poke escript. Interactive EOF and quit leave pending files alone. Bulk accept/reject are explicit commands; running tests never invokes this module for you.
API reference
class Options(
command: String,
directory: String,
name: Option(String),
plain: Bool
)
command: String
INFERRED
Stringdirectory: String
INFERRED
Stringname: Option(String)
INFERRED
Option(String)plain: Bool
INFERRED
Bool
INFERRED
fn(String, String, Option(String), Bool) -> poke/cli.Optionsenum Choice
Choice.Accept
Choice.Reject
Choice.Skip
Choice.Quit
help() -> String
INFERRED
fn() -> Stringparse(arguments: List(String)) -> Result(Options, String)
INFERRED
fn(List(String)) -> Result(poke/cli.Options, String)Parse without touching the filesystem or terminal. Invalid options never fall through to acceptance or rejection.
review(
store: Store,
mode: Mode,
ask: fn() -> Result(Option(String), String),
tell: fn(String) -> Result(Nil, String)
) -> Result(Nil, String)
INFERRED
fn(poke/snapshot.Store, poke/palette.Mode, fn() -> Result(Option(String), String), fn(String) -> Result(Nil, String)) -> Result(Nil, String)Inject input and output when testing the review conversation. The callbacks use Result so a closed output pipe cannot silently accept the next snapshot.
review_selected(
store: Store,
names: List(String),
mode: Mode,
ask: fn() -> Result(Option(String), String),
tell: fn(String) -> Result(Nil, String)
) -> Result(Nil, String)
INFERRED
fn(poke/snapshot.Store, List(String), poke/palette.Mode, fn() -> Result(Option(String), String), fn(String) -> Result(Nil, String)) -> Result(Nil, String)review_selected_with_width(
store: Store,
names: List(String),
mode: Mode,
ask: fn() -> Result(Option(String), String),
tell: fn(String) -> Result(Nil, String),
measure: fn() -> Int
) -> Result(Nil, String)
INFERRED
fn(poke/snapshot.Store, List(String), poke/palette.Mode, fn() -> Result(Option(String), String), fn(String) -> Result(Nil, String), fn() -> Int) -> Result(Nil, String)Supply a live content-width reader when embedding the reviewer. The normal entry point reads terminal geometry again for each redraw and candidate.
run(options: Options) -> Result(Nil, String)
INFERRED
fn(poke/cli.Options) -> Result(Nil, String)main()
INFERRED
fn() -> Nil