shelljs / shx

Portable Shell Commands for Node
MIT License
1.72k stars 44 forks source link

--help should list options #101

Closed binki closed 6 years ago

binki commented 7 years ago

If I run shx -h I don’t see, for example, documentation about --noglob. It’d be helpful if that was documented there for.

I tested in a1faf54d6902954d904099e0cb9760395b805383 (v0.2.1) and it doesn’t appear to be there.

nfischer commented 7 years ago

Yeah, this would probably be a good thing to add support for here. We should modify the help string to start with a header like

Usage: shx [shx-options] <command> [cmd-options]

and explain what those two different types of options are. Then we can iterate over shell.config's properties to show all the shx-options.

We might want to eventually implement help as a ShellJS plugin, so that it can take command names as arguments. Then we can have shx help cp show all of cp's supported cmd-options, similar to how cash's help command works.

nfischer commented 7 years ago

For this issue, let's aim for the following:

This should be a reasonable community contribution if someone wants to try it. We'll leave the rest for future work.