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
CLI Improvements #82
CLI Improvements #82
Conversation
Right now |
As mentioned here, |
Side note: |
Nevermind, it needs autoconf and would add 142 new files and 35k LOC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments, but it looks good otherwise. Happy to approve once you've taken a look.
src/frontend.c
Outdated
* | ||
* Return values are meant for an argp parser function. | ||
* | ||
* TODO: fill this out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either do this or make an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
const char *program_description = "a collaborative ascii editor"; | ||
const char *program_doc = | ||
"COLLASCII\n\n" | ||
"\"The Future Editor of Yesterday, Tomorrow!\"\n\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to have a word here on starting a server (for someone who hasn't gone through extensive collascii training). Something like:
To start a collascii server, make and run server.out with
make server.out && ./server.out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the README be a better place for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That too. I'm thinking that someone who just downloaded collascii after skimming the Readme might do --help
and like to see that info there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some changes the README and the CLI.
With the shiny new cli, you can: - continue to connect to a server - continue to load from a file or stdin - specify a height/width for the canvas, (which will also resize it after loading a file) - get an automagic `git describe` version - file an issue on github - get an introduction to the interface In doing this, I refactored the state initialization into a function and added an arguments_t struct that represents the state of the arguments passed in. I also made some network-related variables global - not sure if that is the best way to do this.
Rebased and ready! |
With the shiny new cli, you can:
git describe
versionI made the current version with
argp
, but that's GNU C and @labseven had some trouble compiling it on macOS. The options are:TODO:
Closes #62