Skip to content

Commit

Permalink
fix(chore): warn on unknown commands and command recommendation (#74)
Browse files Browse the repository at this point in the history
* fix: warn on unknown commands

* feat: suggest matching commands
  • Loading branch information
jamesgeorge007 authored and anikethsaha committed Nov 18, 2019
1 parent 1e93b0c commit b46a707
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/docsify
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ require("yargonaut")

const yargs = require("yargs")
.demandCommand(1, chalk.red("[ERROR] 0 arguments passed. Please specify a command"))
.strict()
.recommendCommands()
.usage(chalk.bold(y18n.__("usage") + ": docsify <init|serve> <path>"))
.command({
command: "init [path]",
Expand Down

0 comments on commit b46a707

Please sign in to comment.