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

Refactor CLI & Commands For Greater Happiness #2143

Merged
merged 2 commits into from
Mar 16, 2014
Merged

Refactor CLI & Commands For Greater Happiness #2143

merged 2 commits into from
Mar 16, 2014

Conversation

parkr
Copy link
Member

@parkr parkr commented Mar 13, 2014

  • Commands know how to initialize themselves
  • External plugins can now ship commands if they want
  • Fix infinite loop when jekyll is run w/o arguments

Fixes #2124.

p.action do |args, options|
if args.empty?
p.go(["-h"])
puts p
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imathis This is how you print the command help. The p.go(['-h']) just results in a big ol' loop that never ends which sucks. If you just print the program, it'll print out the help message as you'd expect.

@parkr
Copy link
Member Author

parkr commented Mar 16, 2014

What say you, @mattr-?

@parkr parkr added this to the 2.0 milestone Mar 16, 2014
parkr added a commit that referenced this pull request Mar 16, 2014
@parkr parkr merged commit a581bc1 into master Mar 16, 2014
@parkr parkr deleted the fix-cli branch March 16, 2014 17:24
parkr added a commit that referenced this pull request Mar 16, 2014
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running bin/jekyll without arguments should show help
4 participants