Skip to content
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

Help text on Windows refers to the tool name as "cli" although it's installed as "markdownlint" #2

DavidAnson opened this issue Jan 20, 2016 · 3 comments


Copy link

This is a minor issue, but potentially confusing for novices. I'd suggest that "Usage:" should say "markdownlint" instead of "cli":

D:\T>markdownlint --help

  Usage: cli [options] <files>

  MarkdownLint Command Line Interface


    -h, --help                 output usage information
    -V, --version              output the version number
    -c, --config [configFile]  Configuration file

As an extremely minor point, the 'O's of "Output" might be capitalized and the 'V' of "-V" lower-cased for consistency with the other switches.

Copy link

It is interesting, I see it as correctly:

Have you installed it globally (-g)? As far as I see you are using Windows.

@DavidAnson DavidAnson changed the title Help text refers to the tool name as "cli" although it's installed as "markdownlint" Help text on Windows refers to the tool name as "cli" although it's installed as "markdownlint" Jan 21, 2016
Copy link
Collaborator Author

Commander attempts to infer the tool name if it is not passed in - see Command.prototype.parse.

On Windows (including when installed globally), argv at that point looks like:

[ 'C:\\Program Files\\nodejs\\node.exe',
  'd:\\T\\markdownlint-cli\\cli.js' ]

Therefore, commander infers the name "cli".

One fix might be to rename cli.js to markdown.js. Another might be something like the following:

var pkg = require('./package');
var commander = require('commander');
var program = new commander.Command(*$/, ''));

If you like, I can send a pull request - or feel free to make the change yourself if you like it.

Copy link

Thanks, @DavidAnson.

For now I just renamed it.
But I don't like it already, if i will see more issues like this, i will rewrite it using meow, argparse, minimist anything like that instead of commander.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants