-
Notifications
You must be signed in to change notification settings - Fork 13
How do I set an alias for the help command? #12
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
Comments
I just published cliffy version 2.4.0 which adds a import { CLI } from "cliffy";
// Alias help to h
cli.addCommand("h", async () => {
cli.showHelp();
}); Although this does not alias the help command for subcommands. Only the main command. Adding an alias for something like this:
Is not currently possible. But It wouldn't be too much work to make that possible as well. So let me know if it's something you need. |
Hi @drew-y, and thanks! I thought of adding a Sample use: I assume I would have to tap into CLI's (input) command interpreter (assuming there is one). Will look it up later and submit if that's ok with you. |
That isn't a bad idea. But you'd have to add special logic for the help command specifically. Internally, the executeCommand method checks to see if the first argument is |
Oh I see that you had already implemented aliases, although I didn't see any of that in the README. Will have to play some more. EDIT |
... if possible. Thanks!
The text was updated successfully, but these errors were encountered: