Add form interface to your CLI program.
Note: Use it at own risk!!
[dependencies]
fui = "0.7"
// Example showing imagined CLI app. with two actions
extern crate fui;
use fui::{Fui, Value};
use fui::form::FormView;
use fui::fields::Text;
fn hdlr(v: Value) {
println!("user input (from hdlr) {:?}", v);
}
fn main() {
Fui::new()
.action(
"ACTION1: description",
FormView::new().field(Text::new("action1 data").help("help for action1 data")),
|v| {
println!("user input (from callback) {:?}", v);
},
)
.action(
"ACTION2: description",
FormView::new().field(Text::new("action2 data").help("help for action2 data")),
hdlr,
)
.run();
}
- select in autocomplete load values while scrolling
- support user's history!
- make fill-error-correct flow pleasent
- support for piping!
- create wrapper FileField
- create wrapper DirField
- ctrl+enter submits (#151)?
- checkbox: automatic toggle on char
- add Field.data & form on_submit returns it?
- optimalizations
- feeders use iterators
- thread
- tests
- error handling & unwraps
- magic stuff:
- add magic which renders form for clap (or structopt) if args missing
- add magic which works with current programs like: ls, grep, etc.