cline

Crates.iocline
lib.rscline
version0.1.0
sourcesrc
created_at2015-11-05 22:39:36.421763
updated_at2015-12-11 23:58:10.571132
descriptionLightweight library that allows bash-like completion of registered commands
homepagehttp://chsitter.github.io/CLIne/cline/
repositoryhttp://chsitter.github.io/CLIne/cline/
max_upload_size
id3371
size29,607
Christoph (chsitter)

documentation

http://chsitter.github.io/CLIne/cline/

README

CLIne - a command line API for rust Build Status

Documentation

The cline crate provides an API that allows users to register CLI commands with an execute and dynamic suggest callback to help implementing command line clients that support auto completion of commands

Usage

extern crate cline;
use cline::{Cli, cline_run};

fn main() {
    let mut cli = Cli::new();

    cli.register(vec!["foo", "bar"], | _ | { println!("running foo bar") });
    cli.register(vec!["foo", "baz"], | _ | { println!("running foo baz") });

    cline_run(&mut cli);
}

Contributors

License

Copyright © 2015 Christoph Sitter

Distributed under the Apache License Version 2.0.

Commit count: 0

cargo fmt