7
$\begingroup$

When answering questions about command line arguments, should we prefer long/short command line arguments?

Short example:

blender -b file_name.blend -x 1 -o //file -F AVI_JPEG

Long example:

blender --background file_name.blend --use-extension 1 --render-output //file --render-format AVI_JPEG

Long example wrapped:

blender --background file_name.blend \
        --use-extension 1 \
        --render-output //file \
        --render-format AVI_JPEG

Reference questions:


The obvious advantage of long args is they are more self-documenting (you don't have to explain what -F does in every answer for eg). The disadvantage is they don't fit so neatly on a single line.

Wrapping command line args is an option but also makes it tricky to copy & paste out of the answer.

$\endgroup$
1
  • 1
    $\begingroup$ I think it would be nice to include both $\endgroup$
    – user235
    Oct 16 '13 at 19:22
3
$\begingroup$

I think any variation is fine provided that it answers the question and explains what each argument is doing rather than just slapping a cryptic string for the user to copy and paste.

For example, in this answer, the short argument names were used but each argument was explained in a separate block.

Also, in both answers you linked, the answers link back to the Command Line wiki where the parameters that were used could easily be looked up but I think we should try to keep users on this site as much as possible (this also correlates with our policy of entertaining self contained answers) so the long self documented arguments should be the preferred choice here. For readability purposes, these can always be wrapped as you demonstrated.

Regardless of how it is presented, this shouldn't be a problem as long as it answers the question but an ideal combination might be having it on one line for easy copy and paste and another wrapped copy (if it is rather long).

$\endgroup$
2
  • $\begingroup$ re: provided that it answers the question and explains what each argument is doing, Perhaps we should encourage just linking to docs explaining arg meanings seems a bit redundant. $\endgroup$
    – ideasman42
    Sep 25 '13 at 4:28
  • $\begingroup$ It's a really trivial decision at most since as I said any variation works provided it does both so either is fine IMO. $\endgroup$
    – iKlsR
    Sep 25 '13 at 11:46
2
$\begingroup$

I would say both are acceptable, anyway I would prefer the long command line arguments:

blender --background file_name.blend --use-extension 1 --render-output //file --render-format AVI_JPEG

The one who asked the question should be eager enough to lookup details. In case someone else searchs the site for an answer he could quickly decide whether or not the answer puts him on the right track, because the long variant is self-explanatory.

In case the short version is used at least a link to the manual page should be added.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .