[Koha-devel] Coding guidelines for command-line scripts

Mark Tompsett mtompset at hotmail.com
Wed Aug 29 16:40:47 CEST 2012


Greetings,

> http://wiki.koha-community.org/wiki/Coding_Guidelines#Command-line_argument_conventions

Good start, particularly the reference to the gnu link.


> [snip]
> Would everyone agree that new command-line scripts must accept
> "--help" (and include relevant help, of course) ?

I was thinking perhaps short versions might be considered passable too?
So -h would suffice, though --help would be preferred. With GetLongOpts()


> Should it also be the standard that command-line scripts should not
> perform any action unless an argument is passed?

Actually, this is what I like about the koha_perl_deps.pl script.
No parameters gives the help, though this is definitely not a normally
expected behaviour.


+1 for required help parameter.

I do like less typing, so I'm not so strict on --help vs. -h.
http://www.gnu.org/prep/standards/standards.html#index-CGI-programs_002c-standard-options-for
Yet, if this is the standard we want to stick with. I'm okay with it.


GPML,
Mark Tompsett 



More information about the Koha-devel mailing list