Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query does not work with "hierarchical" sets #69

Open
olofhagsand opened this issue Oct 20, 2021 · 1 comment
Open

Query does not work with "hierarchical" sets #69

olofhagsand opened this issue Oct 20, 2021 · 1 comment
Labels

Comments

@olofhagsand
Copy link
Member

Given a "hierarchical" cligen set command structure as follows:

  a @{
    b;
    c; @{
      d;
      e;
    }
  }

It is possible to issue command: a c b and a c d b, but query and completion does not work properly.
For example, the following lacks the "b" option:

> a c ?
  <cr>
  d                    
  e    

expected behavior:

> a c ?
  <cr>
  b        <-------------
  d                    
  e    
@olofhagsand
Copy link
Member Author

The cligen match code in match_pattern_sets() uses a result structure made for matches in a single parse-tree level. This works for a single match and for multiple matches on the same level, but does not work in the case shown here where there is a match in two levels: b in one level and d, e in another level.
In order to solve this, the code for matching multiple commands need to be enhanced. Specifically, the match_result structure needs to handle multiple levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant