diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-11-29 20:45:55 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-11-29 20:45:55 -0800 |
commit | 27b3f5e9c8bdfbd63ec06cd0a3472f80ba8d3752 (patch) | |
tree | 00e4bb9128c95e374c26843e7d9b6dea82320f46 /src/bin | |
parent | 57c8bea738990b9cd5efcfbc081249025fa5d608 (diff) | |
download | modelthing-27b3f5e9c8bdfbd63ec06cd0a3472f80ba8d3752.tar.gz modelthing-27b3f5e9c8bdfbd63ec06cd0a3472f80ba8d3752.zip |
small improvements to CLI tools
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/mt-tool.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/mt-tool.rs b/src/bin/mt-tool.rs index 7dab194..03f590a 100644 --- a/src/bin/mt-tool.rs +++ b/src/bin/mt-tool.rs @@ -100,8 +100,10 @@ fn main() { println!("{}", me.ast.repr_js().unwrap()); }, "list" => { - // XXX: search path? - for m in modelthing::search_models(Path::new("examples")) { + let search_path = + if matches.free.len() >= 2 { matches.free[1].clone() } + else { "examples".to_string() }; + for m in modelthing::search_models(Path::new(&search_path)) { println!("{}", m) } }, |