File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
crates/deno_task_shell/src Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,21 @@ ASSIGNMENT_TILDE_PREFIX = ${
3939 )*
4040}
4141
42- FILE_NAME_PENDING_WORD = ${ (!(WHITESPACE | OPERATOR | NEWLINE) ~ (UNQUOTED_ESCAPE_CHAR | ("$" ~ VARIABLE) | UNQUOTED_CHAR | QUOTED_WORD))+ }
42+ FILE_NAME_PENDING_WORD = ${
43+ (TILDE_PREFIX ~ (!(WHITESPACE | OPERATOR | NEWLINE) ~ (
44+ UNQUOTED_ESCAPE_CHAR |
45+ ("$" ~ VARIABLE) |
46+ UNQUOTED_CHAR |
47+ QUOTED_WORD
48+ ))*)
49+ |
50+ (!(WHITESPACE | OPERATOR | NEWLINE) ~ (
51+ UNQUOTED_ESCAPE_CHAR |
52+ ("$" ~ VARIABLE) |
53+ UNQUOTED_CHAR |
54+ QUOTED_WORD
55+ ))+
56+ }
4357
4458QUOTED_PENDING_WORD = ${ (
4559 EXIT_STATUS |
Original file line number Diff line number Diff line change @@ -796,6 +796,10 @@ fn parse_word(pair: Pair<Rule>) -> Result<Word> {
796796 let quoted = parse_quoted_word ( part) ?;
797797 parts. push ( quoted) ;
798798 }
799+ Rule :: TILDE_PREFIX => {
800+ let tilde_prefix = parse_tilde_prefix ( part) ?;
801+ parts. push ( tilde_prefix) ;
802+ }
799803 _ => {
800804 return Err ( anyhow:: anyhow!(
801805 "Unexpected rule in FILE_NAME_PENDING_WORD: {:?}" ,
Original file line number Diff line number Diff line change 1+ echo $PATH > ~ /output.txt
You can’t perform that action at this time.
0 commit comments