-
Notifications
You must be signed in to change notification settings - Fork 359
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
gmt.c: add classic option to --new-script #5403
Conversation
fprintf (stderr, " --show-plugindir Show directory for plug-ins.\n"); | ||
fprintf (stderr, " --show-sharedir Show directory for shared GMT resources.\n"); | ||
fprintf (stderr, " --show-userdir Show full path of user's ~/.gmt dir\n"); | ||
fprintf (stderr, " --version Print GMT version number.\n\n"); | ||
fprintf (stderr, "if <module-options> is \'=\' we call exit (0) if module exist and non-zero otherwise.\n\n"); | ||
status = GMT_NOERROR; | ||
} |
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.
Please, do not change the formatting. Those tabs above should not be there. Only spaces guarantee a good alignment in all editor settings (and possible terminals)
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'm very certain I used spaces when I made the changes, and double checked now. Do they appear as tabs to you?
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.
Hi @anbj, while it may not be used a lot I am OK with accepting your contribution. However, I'd like to see a few changes:
- Split the new-script usage message into two separate lines, one for classic and the original one, as is done for other classic versions of options.
- Use less spaces: Only 1 after the longest of all entries, which after splitting into two lines will remain the show-modules-core I think. As per Improve usage documentation and break synopsis lines for all GMT modules #5341, we want to keep things tighter.
- You need to add an entry in the gmt.rst file as well for documentation.
You can check out a PR branch with:
So in this case it would be:
But again, I typed |
OK, thanks. No big deal either (and easy to fix in case they were there). But can't look more at this now. Need to go out. |
Regarding the PR, I have no particular opinion. Asking classic prints this
which does not seem a particular useful bit of info. |
I'm closing this. It was fun to do, but with 1-2 people using it, it's not worth the code change. |
Sorry we could not be more welcoming on this one... But see #5341 if you want to practice more C! |
No worries! I'll check out #5341! |
I've added the option
--new-script-classic
togmt
to make a script template without the modern mode related output.You know, for the old-timers.
This was just an experiment to play with C. Consider to merge. I wont be sad if you choose not to.