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

Comand usage, aliases, flags and rules #65

Closed
6 tasks
navidshaikh opened this issue Apr 9, 2019 · 6 comments
Closed
6 tasks

Comand usage, aliases, flags and rules #65

navidshaikh opened this issue Apr 9, 2019 · 6 comments

Comments

@navidshaikh
Copy link
Collaborator

Lets separate the constant, usage-text, aliases, flags and their respective operations and re-organize them to be usable in command implementations.

Presently, the command implementations defines them all together in the same file.

We should have these items organized properly and imported as needed. This should help in testing as well.

  • Command usage text

  • Command example text

  • Help section structure

  • Aliases

  • flags

  • Common operations

@maximilien
Copy link
Contributor

Do you have an example @navidshaikh?

I asked because if I understood this request correctly, you would have the text moved to a different file or location from the command definition and have a constant in it's place in the definition.

While an interesting suggestion it would result in less readable code --- need to read text file or constant file and code for command.

I kind of like having the command into one place. I can see moving the runE(...) function out into it's own function or even file but the command definition should include all that is needed IMO.

@navidshaikh
Copy link
Collaborator Author

I asked because if I understood this request correctly, you would have the text moved to a different file or location from the command definition and have a constant in it's place in the definition.

That's correct, but in an organized manner, not like a text-file as such.

This came after suggestion from @cppforlife during a PR review.

IMO, keeping the constants part separate from definitions helps being consistent in the help/example language/grammar used across commands.

I do not have an example right now, but I plan to work on this once we have the v0.1 issues sorted.

@maximilien
Copy link
Contributor

maximilien commented Apr 25, 2019

IMO, keeping the constants part separate from definitions helps being consistent in the help/example language/grammar used across commands.

I think we should avoid separating text to the code. Separating is premature optimization IMO.

@cppforlife
Copy link

This came after suggestion from @cppforlife during a PR review.

curious which suggestion?

@navidshaikh
Copy link
Collaborator Author

curious which suggestion?

@cppforlife It's for aliases, here.

@sixolet
Copy link
Contributor

sixolet commented Apr 26, 2019

Let's keep text describing flags with the flags, and command usage with the command for now. It's more readable that way.

@sixolet sixolet closed this as completed Apr 26, 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

4 participants