MCPcopy Create free account
hub / github.com/corrode/write-yourself-a-shell / main

Function main

examples/final.rs:127–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127fn main() {
128 loop {
129 show_prompt();
130 let line = read_line();
131 let chains = chains_from_line(&line);
132 for chain in chains {
133 chain.run();
134 }
135 }
136}
137
138/// If stdout is printed to a terminal, print a prompt.
139/// Otherwise, do nothing. This allows to redirect the shell stdout

Callers

nothing calls this directly

Calls 4

show_promptFunction · 0.70
read_lineFunction · 0.70
chains_from_lineFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected