marklogic-contentpump icon indicating copy to clipboard operation
marklogic-contentpump copied to clipboard

Add option to disable automatically outputting helpfile information on bad option entry

Open aebadirad opened this issue 7 years ago • 5 comments

Perhaps add an option in the lo4j properties not to spit out the help file content for a misconfigured command line config option?

Some of these help file entries are pretty large, and can make it difficult to see what the input error was in environments with limited scrollback capability.

This is a minor request to improve usability in difficult environments.

aebadirad avatar Jul 29 '17 00:07 aebadirad

Do you use mlcp.sh/mlcp.bat, JAVA program or custom shell scripts to invoke mlcp?

mattsunsjf avatar Jul 31 '17 01:07 mattsunsjf

mlcp.sh/mlcp.bat invokes this behavior out of the box.

An easy way to trigger it is just to mlcp import -fakeoption, but it does it with a valid option and a bad value too. It's a very spammy helpfile.

aebadirad avatar Jul 31 '17 22:07 aebadirad

Some command line tools have the notion of short and long usage messages. You get an abbreviated message if you screw up the command line, and a longer one if you use the help option. That might be something to consider.

For example:

$ tar foo
tar: Old option 'f' requires an argument.
Try 'tar --help' or 'tar --usage' for more information.

$ cp foo
cp: missing destination file operand after ‘foo’
Try 'cp --help' for more information.

I've also seen cases where there's abbreviate usage info like "mycmd filename [options]".

kcoleman-marklogic avatar Jul 31 '17 22:07 kcoleman-marklogic

I very much so like that suggestion. This would be ideal from a field-facing perspective.

aebadirad avatar Aug 02 '17 03:08 aebadirad

Ok, I will see what I can do here.

mattsunsjf avatar Aug 02 '17 17:08 mattsunsjf