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

Syntax to enter commands regardless of order #32

Closed
sidbav opened this issue Nov 27, 2019 · 3 comments
Closed

Syntax to enter commands regardless of order #32

sidbav opened this issue Nov 27, 2019 · 3 comments

Comments

@sidbav
Copy link

sidbav commented Nov 27, 2019

Is there a syntax to specify a valid command regardless of the order the command is entered?

For example, I want the following commands to be valid:

cli> aa bb cc dd
cli> aa bb dd cc
cli> aa cc bb dd
cli> aa cc dd bb
cli> aa dd cc bb
cli> aa dd bb cc

Right now I believe you would have to explicitly state each command in the syntax like so:

aa { 
  bb { 
    cc dd;
    dd cc;
  }
  cc { 
    bb dd;
    dd bb;
  }
  dd { 
    bb cc;
    cc bb;
  }
}

It is fine implementing this when there are only a few commands which you want like this. (i.e here we have 3 keyword, so only 3! (6) to consider)

However, if you have lots of commands like this. then the amount of permutations that you need to consider grows quickly!

Any solution to this?

@olofhagsand
Copy link
Member

See #22 (and #23).
This is a sufficiently common request so I will try to look into it.

@olofhagsand
Copy link
Member

New "sets" feature added, see:
ed1997a

Example: aa @{ bb; cc; dd; }

@sidbav
Copy link
Author

sidbav commented Dec 9, 2019

Great! This seems to be working! Thanks for adding it in!

@sidbav sidbav closed this as completed Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants