node-core-utils icon indicating copy to clipboard operation
node-core-utils copied to clipboard

git node --help does not work

Open targos opened this issue 6 years ago • 10 comments

$ git node --help
No manual entry for git-node

Can we do something about it?

git-node --help is OK.

Edit: this is on Linux with zsh

targos avatar Mar 07 '18 12:03 targos

Hmm so I think to make it work on Linux, we should set up proper man pages (it works on Mac because the rules on macOS seem to be different).

Refs: https://www.atlassian.com/blog/git/extending-git

joyeecheung avatar Mar 07 '18 12:03 joyeecheung

General outline

  1. Write a man page in man/git-node.1
  2. Crete a post-install script that moves man/git-node.1 to the path.join(process.execPath, '..', '..', 'share', 'man', 'man1') (or is there a better way to find out the man pages location of the current Node.js intallation? Or maybe move it to /usr/local/share/man/man1?)

question:

  1. Should we provide a uninstall command?
  2. I am not sure how it works on Windows..

joyeecheung avatar Mar 07 '18 12:03 joyeecheung

For generating man pages we can use something like cli-manpage and put the command generating it under a prepublishOnlyso it runs before publishing.

And then use a post-install script to move it if it's the correct platform.

Should we provide a uninstall command?

I think so, but maybe not as a command, it should remove itself once the package is uninstalled.

I am not sure how it works on Windows..

I am not sure about it too.

priyank-p avatar Mar 07 '18 14:03 priyank-p

git help defaults to html on Windows. --html-path, --man-path and --info-path arguments to git show where the Git documentation is stored.

richardlau avatar Mar 07 '18 15:03 richardlau

Doesn't seem to work for me on macOS with the latest npm version of node-core-utils, am I doing something wrong?

image image
git version: 2.16.2
node-core-utils version: 1.11.1

gibfahn avatar Mar 07 '18 20:03 gibfahn

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

github-actions[bot] avatar Aug 17 '20 00:08 github-actions[bot]

Just tested, still an issue

mmarchini avatar Aug 17 '20 16:08 mmarchini

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

github-actions[bot] avatar Nov 16 '20 00:11 github-actions[bot]

Oh wait, we could just log the help text instead of creating a man page anyway

joyeecheung avatar Nov 17 '20 15:11 joyeecheung

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

github-actions[bot] avatar Feb 16 '21 00:02 github-actions[bot]