mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
fileset, revset: settle on optionally-quoted pattern syntax
Suppose revsets and filesets are primarily used in command shell, it would be annoying if quoting is required in addition to the shell quoting. We might also want to relax the revset parser to allow bare * in glob string. Closes #2101
This commit is contained in:
parent
dc7216d73a
commit
d37a5b1b74
3 changed files with 3 additions and 5 deletions
|
|
@ -407,10 +407,10 @@ revsets (expressions) as arguments.
|
|||
|
||||
## String patterns
|
||||
|
||||
Functions that perform string matching support the following pattern syntax:
|
||||
Functions that perform string matching support the following pattern syntax (the
|
||||
quotes are optional):
|
||||
|
||||
* `"string"`, or `string` (the quotes are optional), or `substring:"string"`:
|
||||
Matches strings that contain `string`.
|
||||
* `"string"` or `substring:"string"`: Matches strings that contain `string`.
|
||||
* `exact:"string"`: Matches strings exactly equal to `string`.
|
||||
* `glob:"pattern"`: Matches strings with Unix-style shell [wildcard
|
||||
`pattern`](https://docs.rs/glob/latest/glob/struct.Pattern.html).
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ function_arguments = {
|
|||
| ""
|
||||
}
|
||||
|
||||
// TODO: change rhs to string_literal to require quoting? #2101
|
||||
string_pattern = {
|
||||
strict_identifier
|
||||
~ pattern_kind_op
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ formal_parameters = {
|
|||
| ""
|
||||
}
|
||||
|
||||
// TODO: change rhs to string_literal to require quoting? #2101
|
||||
string_pattern = { strict_identifier ~ pattern_kind_op ~ symbol }
|
||||
|
||||
primary = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue