Passing --help to custom subcommand #3553
-
I've written a custom subcommand,
If this file doesn't exist, why isn't |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
The message you've got is different from the message Git would produce, so I'm assuming you're on an older version. You could propose passing the It would be nice to have a more general solution for external commands, but I'm not sure how that would look. |
Beta Was this translation helpful? Give feedback.
-
Interesting! A temporary work-around is to use On a tangential note, you can't |
Beta Was this translation helpful? Give feedback.
-
In the context of this project, it means that |
Beta Was this translation helpful? Give feedback.
git foo --help
gets internally converted togit help foo
Thegit help
command works by deciding a help page to show and then passing that toinfo
/man
(or some other man page viewer)/a browser (or a helper application) to show that page, depending on configuration. Local HTML help pages are the only case where we can even detect that the page doesn't exist, and even that detection is new in Git 2.34.0 (or maybe 2.33.1).The message you've got is different from the message Git would produce, so I'm assuming you're on an older version.
You could propose passing the
--help
option to external commands in this specific case on the mailing list, but I'm not sure they'll like that idea. This only …