parent
47f3e5208b
commit
25f56dd856
|
@ -157,6 +157,18 @@ cat ${BAR} ${ABC=def} ${GHI:?jkl}
|
||||||
(string (simple_expansion (variable_name)))
|
(string (simple_expansion (variable_name)))
|
||||||
(string (expansion (variable_name) (concatenation (word)))))))
|
(string (expansion (variable_name) (concatenation (word)))))))
|
||||||
|
|
||||||
|
=============================
|
||||||
|
Words ending with '$'
|
||||||
|
=============================
|
||||||
|
|
||||||
|
grep ^${var}$
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(program (command
|
||||||
|
(command_name (word))
|
||||||
|
(concatenation (word) (expansion (variable_name)))))
|
||||||
|
|
||||||
=============================
|
=============================
|
||||||
Command substitutions
|
Command substitutions
|
||||||
=============================
|
=============================
|
||||||
|
|
|
@ -252,6 +252,11 @@ Test commands with regexes
|
||||||
[[ $CMD =~ (^|;)update_terminal_cwd($|;) ]]
|
[[ $CMD =~ (^|;)update_terminal_cwd($|;) ]]
|
||||||
[[ ! " ${completions[*]} " =~ " $alias_cmd " ]]
|
[[ ! " ${completions[*]} " =~ " $alias_cmd " ]]
|
||||||
! [[ "$a" =~ ^a|b\ *c|d$ ]]
|
! [[ "$a" =~ ^a|b\ *c|d$ ]]
|
||||||
|
[[ "$1" =~ ^${var}${var}*=..* ]]
|
||||||
|
[[ "$1" =~ ^\-${var}+ ]]
|
||||||
|
[[ ${var1} == *${var2}* ]]
|
||||||
|
[[ "$server" =~ [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]
|
||||||
|
[[ "$primary_wins" =~ ([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}) ]]
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -273,7 +278,27 @@ Test commands with regexes
|
||||||
(test_command
|
(test_command
|
||||||
(binary_expression
|
(binary_expression
|
||||||
(string (simple_expansion (variable_name)))
|
(string (simple_expansion (variable_name)))
|
||||||
(regex)))))
|
(regex))))
|
||||||
|
(test_command
|
||||||
|
(binary_expression
|
||||||
|
(string (simple_expansion (variable_name)))
|
||||||
|
(regex)))
|
||||||
|
(test_command
|
||||||
|
(binary_expression
|
||||||
|
(string (simple_expansion (variable_name)))
|
||||||
|
(regex)))
|
||||||
|
(test_command
|
||||||
|
(binary_expression
|
||||||
|
(expansion (variable_name))
|
||||||
|
(regex)))
|
||||||
|
(test_command
|
||||||
|
(binary_expression
|
||||||
|
(string (simple_expansion (variable_name)))
|
||||||
|
(regex)))
|
||||||
|
(test_command
|
||||||
|
(binary_expression
|
||||||
|
(string (simple_expansion (variable_name)))
|
||||||
|
(regex))))
|
||||||
|
|
||||||
===============================
|
===============================
|
||||||
Subshells
|
Subshells
|
||||||
|
|
|
@ -404,6 +404,7 @@ module.exports = grammar({
|
||||||
$._special_character,
|
$._special_character,
|
||||||
)
|
)
|
||||||
))),
|
))),
|
||||||
|
optional(seq($._concat, '$'))
|
||||||
)),
|
)),
|
||||||
|
|
||||||
_special_character: $ => token(prec(-1, choice('{', '}', '[', ']'))),
|
_special_character: $ => token(prec(-1, choice('{', '}', '[', ']'))),
|
||||||
|
|
|
@ -1615,6 +1615,27 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "CHOICE",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "SEQ",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_concat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "$"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "BLANK"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue