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

Use H for host option short flag. #247

Merged
merged 1 commit into from
Apr 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ program

program.command('develop')
.description('Start development server. Watches files and rebuilds and hot reloads if something changes') // eslint-disable-line max-len
.option('-h, --host <url>',
.option('-H, --host <url>',
`Set host. Defaults to ${defaultHost}`,
defaultHost
)
Expand Down Expand Up @@ -56,7 +56,7 @@ program.command('build')

program.command('serve-build')
.description('Serve built site.')
.option('-h, --host <url>',
.option('-H, --host <url>',
`Set host. Defaults to ${defaultHost}`,
defaultHost
)
Expand All @@ -78,6 +78,12 @@ program
newCommand(rootPath, starter)
})

program.on('--help', () => {
console.log(`To show subcommand help:

gatsby [command] -h
`)
})

// If the user types an unknown sub-command, just display the help.
const subCmd = process.argv.slice(2, 3)[0]
Expand Down