-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
design bugSomething isn't working due to the current designSomething isn't working due to the current design
Description
When using the != operator with the filter or pyfilter commands, the lexer will incorrectly split that operator into two tokens, instead of grouping the two characters into a single token. Specifically, it will split != into ! and = tokens, when it should return a single != token.
Here's a concrete example:
> spa | filter obj.spa_name != "rpool" | pp
In this example, the expectation is for the following to occur:
spais called without any argumentsfilteris called with arguments:obj.spa_name != "rpool"ppis called without any arguments
Unfortunately, due to the bug in the lexer, this does not happen. What does happen is the following:
spais called without any argumentsfilteris called with arguments:obj.spa_name- A suprocess is created to execute:
= "rpool" | pp
This is because != is split into the tokens ! and =, and then we interpret the ! special, as it is used to denote piping into a subprocess rather than piping into an SDB command.
Metadata
Metadata
Assignees
Labels
design bugSomething isn't working due to the current designSomething isn't working due to the current design