Skip to content

Commit

Permalink
Adds context-aware feedback to default command
Browse files Browse the repository at this point in the history
  • Loading branch information
jamonholmgren committed Dec 19, 2017
1 parent ba89ac5 commit 7d37f4d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core-commands/default.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
module.exports = {
run: ({ runtime, print }) => {
run: ({ parameters, runtime, print, strings, meta }) => {
const infoMessage = strings.isBlank(parameters.first)
? `Welcome to ${print.colors.cyan(runtime.brand)} CLI version ${meta.version()}!`
: `Sorry, didn't recognize that command!`
print.info(`
Sorry, didn't recognize that command!
${infoMessage}
Type ${print.colors.magenta(`${runtime.brand} --help`)} to view common commands.`)
}
}

0 comments on commit 7d37f4d

Please sign in to comment.