elementary shell behavior: can kick off a foreground process and
handle signals
This commit is contained in:
parent
3b1ae0efd5
commit
99cb9e5a2e
17 changed files with 619 additions and 167 deletions
13
src/lex.rs
13
src/lex.rs
|
|
@ -206,13 +206,20 @@ fn process(document: &String) -> Result<Box<Seg>, String> {
|
|||
}
|
||||
|
||||
/* Returns true if token
|
||||
* - is all alphanumeric except dash and underscore
|
||||
*
|
||||
* - is all alphanumeric except dash, question, and underscore
|
||||
* - equals is also allowed but only for shell command compatibility
|
||||
* else returns false
|
||||
*/
|
||||
fn tok_is_symbol(token: &str) -> Option<String> {
|
||||
for t in token.chars() {
|
||||
if !t.is_alphanumeric() && t != '-' && t != '_' && t != '?' {
|
||||
if !t.is_alphanumeric() &&
|
||||
t != '-' &&
|
||||
t != '_' &&
|
||||
t != '?' &&
|
||||
t != '=' &&
|
||||
t != '.' &&
|
||||
t != '/'
|
||||
{
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue