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

Ordering of parameters in cli mode #10

Open
petteraas opened this issue Apr 12, 2014 · 1 comment
Open

Ordering of parameters in cli mode #10

petteraas opened this issue Apr 12, 2014 · 1 comment

Comments

@petteraas
Copy link
Member

I realized that adjusting volume is now done this way

socos volume {ip} -30

that feels a bit backward, wouldn't it make more sense to reorder it to:

socos {ip} volume -30

or do this a bit smarter, by not requiring a specific order. We have a list of valid commands, so we can search for one of those within the list of parameters, and we can search for valid arguments to these commands, this way we would recognise that:

socos {ip} volume -30

is actually the same as e.g.

socos volume -30 {ip}

Another command that ends up this way is:

socos play {ip} 20
@petteraas petteraas changed the title Ordering of paramerters when not opening interactive shell Ordering of parameters in cli mode Apr 12, 2014
@KennethNielsen
Copy link
Member

I agree that the original order seems a bit backwards. I'm not sure if it is worth the trouble though to remove the dependence on the order, since that might make the checks of "valid arguments" quite tricky. I think the socos {ip} command any number of command args syntax is good and simple (to use and implement).

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