mirror of
https://github.com/nushell/nushell.git
synced 2024-12-25 16:39:08 +01:00
Soften restrictions for external parameters (#1277)
* Soften restrictions for external parameters * Add test
This commit is contained in:
parent
a2bb23d78c
commit
798a24eda5
@ -1008,8 +1008,7 @@ fn is_boundary(c: Option<char>) -> bool {
|
||||
|
||||
fn is_external_word_char(c: char) -> bool {
|
||||
match c {
|
||||
';' | '|' | '#' | '-' | '"' | '\'' | '$' | '(' | ')' | '[' | ']' | '{' | '}' | '`'
|
||||
| '.' => false,
|
||||
';' | '|' | '"' | '\'' | '$' | '(' | ')' | '[' | ']' | '{' | '}' | '`' => false,
|
||||
other if other.is_whitespace() => false,
|
||||
_ => true,
|
||||
}
|
||||
|
@ -78,6 +78,19 @@ mod it_evaluation {
|
||||
}
|
||||
}
|
||||
|
||||
mod external_words {
|
||||
use super::nu;
|
||||
|
||||
#[test]
|
||||
fn relaxed_external_words() {
|
||||
let actual = nu!(cwd: ".", r#"
|
||||
cococo joturner@foo.bar.baz
|
||||
"#);
|
||||
|
||||
assert_eq!(actual, "joturner@foo.bar.baz");
|
||||
}
|
||||
}
|
||||
|
||||
mod tilde_expansion {
|
||||
use super::nu;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user