ozankasikci / rust-music-theory

A music theory guide written in Rust.
MIT License
626 stars 28 forks source link

Running the scale command with any argument gives an error #30

Closed amanharwara closed 3 years ago

amanharwara commented 3 years ago

Command line output:

❯ rustmt scale D Locrian
error: Found argument 'D' which wasn't expected, or isn't valid in this context
USAGE:
    rustmt.exe scale <SUBCOMMAND>

For more information try --help

Same thing happens when using something like rustmt scale C Minor

Installed on a Windows 10 machine using cargo install.

ozankasikci commented 3 years ago

Hi @amanharwara, thanks for reporting the issue!

I tried and indeed it gives an error. @XBagon this seems to be related to your latest PR regarding CLI refactoring, do you have any idea what is wrong here?

I will revert the changes for the time being.

ozankasikci commented 3 years ago

@amanharwara reverted the CLI changes, if you pull the latest code, it should work now.

amanharwara commented 3 years ago

Works correctly now. Thanks!

XBagon commented 3 years ago

I really missed writing about this change. It's expecting the subcommand notes or list, help should clear this up.

I couldn't keep the current "API", cause strucopt doesn't allow it that easily, and I thought for good reason. The API would be a lot cleaner that way removing a parameter that can be a string argument or a subcommand. Really forgot to tell you about this or change the README, sorry!

I don't mind the reversion for the moment though, as I hadn't time to continue to work at it and add the missing features.