Trying to match a file the name of which starts with a space character with a fox name test does not match the file.
According to the documentation, whitespace in a fox name test must be escaped. There are two possible forms:
- Canonical syntax:
` a`
- Abbreviated syntax:
~ a
They both fail to match a file named ' a':
> ls ' a'
a
> fox '~ a'
> fox '` a`'
If the space is not in leading position, everything works as expected (for illustration purposes, space characters in the result are represented by ⎵ ):
> ls 'a '
a⎵
> fox 'a~ '
/strange-names/a⎵
> fox '`a `'
/strange-names/a⎵
The generated regular expression looks fine in both cases.
> fox -p '~ a'
<foxpathTree>
<foxpath context="/strange-names" text="~ a">
<foxStep axis="child" name=" a" regex="^ a$"/>
</foxpath>
</foxpathTree>
Trying to match a file the name of which starts with a space character with a fox name test does not match the file.
According to the documentation, whitespace in a fox name test must be escaped. There are two possible forms:
` a`~ aThey both fail to match a file named
' a':If the space is not in leading position, everything works as expected (for illustration purposes, space characters in the result are represented by ⎵ ):
The generated regular expression looks fine in both cases.