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

Add a help command #3

Merged
merged 1 commit into from
May 14, 2015
Merged

Add a help command #3

merged 1 commit into from
May 14, 2015

Conversation

RobertAudi
Copy link

Add a help command along with help files. Usage:

$ np help
$ np help add
$ np help help

@joelpurra joelpurra merged commit cd68841 into joelpurra:master May 14, 2015
joelpurra added a commit that referenced this pull request May 14, 2015
Add a help command

* RobertAudi/help-command:
  Add a help command
@joelpurra
Copy link
Owner

@RobertAudi: that's a great addition! Nice to see that it's easily extensible as well.

Thank you very much =)

@joelpurra
Copy link
Owner

Released v1.2.0 with the np help command.

@RobertAudi
Copy link
Author

@joelpurra You are welcome 👍

I also wanted to generate a man page from the USAGE.md file and I did, but I used md2man which is a ruby gem.

It might be better to use something like groff (which comes with OS X and probably some Linux distros) and automate the generation with a Makefile. But that would mean that the help/manpage will need to be writter in a format supported by groff...

Unless you don't mind having a ruby gem as development dependency.

@joelpurra
Copy link
Owner

@RobertAudi: It'd be sweet to have a man page! Can you add it?

Ruby with md2man isn't a trivial dependency as I'm not sure which platforms people use np on, but guess developers could check in the generated roff file after each USAGE.md change. (Checking in generated files isn't something I like to do or encourage though.)

I'm using brew install npshell, and there's support for installing man pages with brew. If you are a brew user it'd be great to see the new man page built and installed by npshell.rb.

By the way -- brew is written in ruby and also knows about ruby gems, so maybe it's a trivial dependency for brew?

@RobertAudi
Copy link
Author

I am a homebrew user but I am not sure about recipes creation. However I just got an idea. We could generate a manpage using a pre-commit git hook and commit the thing. I don't see what's wrong with committing it even if it's generated since it's not specific to the environment of a user. Also, as I said before, I don't think a set of development dependencies would be a problem. Regular users won't need them.

@joelpurra
Copy link
Owner

@RobertAudi: sure, that'd be convenient -- if the pre-commit hook doesn't crash for developers who don't have all dependencies. If they changed USAGE.md there could be a warning though.

@RobertAudi
Copy link
Author

@joelpurra The pre-commit hook is just a shell script. So we can check if all the deps are present.

@joelpurra joelpurra mentioned this pull request May 17, 2015
@joelpurra
Copy link
Owner

@RobertAudi: see #4!

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

Successfully merging this pull request may close these issues.

None yet

2 participants