fix prompt
This commit is contained in:
parent
06f9a82b01
commit
ecbc47d4fe
2 changed files with 7 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ use std::io;
|
|||
use std::rc::Rc;
|
||||
|
||||
fn prompt_default_callback(_: &Seg, _: &mut SymTable) -> Result<Ctr, String> {
|
||||
Ok(Ctr::String("λ ".to_string()))
|
||||
Ok(Ctr::Symbol("λ ".to_string()))
|
||||
}
|
||||
|
||||
/* loads defaults, evaluates config script */
|
||||
|
|
|
|||
|
|
@ -123,11 +123,15 @@ impl Args {
|
|||
fn validate_inputs(&self, args: &Seg) -> Result<(), String> {
|
||||
match self {
|
||||
Args::None => {
|
||||
if args.is_empty() {
|
||||
if args.len() == 1 {
|
||||
if let Ctr::None = *args.car {
|
||||
return Ok(())
|
||||
} else {
|
||||
return Err("expected no args".to_string())
|
||||
}
|
||||
} else {
|
||||
return Err("expected no args".to_string())
|
||||
}
|
||||
},
|
||||
Args::Infinite => {
|
||||
if !args.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue