!help command #7

Open
opened 7 years ago by lub · 3 comments
lub commented 7 years ago
Owner

Display all commands. Does it make sense to put it in a code block for scrolling?

Possibility to query only a selection (e.g. '!help imninja' displays all commands under '!imninja')

Display all commands. Does it make sense to put it in a code block for scrolling? Possibility to query only a selection (e.g. '!help imninja' displays all commands under '!imninja')
lub changed title from help command to !help command 7 years ago
lub started working 7 years ago
lub stopped working 7 years ago
2s
pandro added the
Feature
label 7 years ago
lub commented 7 years ago
Poster
Owner

Not sure about implementation for this one. Hardcoded?

Or maybe some sort of top-level alias support, which also enables configuring a !help in .yaml?

Not sure about implementation for this one. Hardcoded? Or maybe some sort of top-level alias support, which also enables configuring a !help in .yaml?
pandro commented 7 years ago
Collaborator

My idea would be a generic hard-coded help text that doesn't cover commands but basic bot usage. From there we could refer to command specific helps.

I believe we already write command.usage = "How to use the command". We could just use that to generate a list for each command we query for...

My idea would be a generic hard-coded help text that doesn't cover commands but basic bot usage. From there we could refer to command specific helps. I believe we already write `command.usage = "How to use the command"`. We could just use that to generate a list for each command we query for...
lub commented 7 years ago
Poster
Owner

Yeah, the information is there. In .usage normally there is the usage for the arguments itself and everything else can be found in commands.projects and children.

I thought about aliases, because they may become handy in future in other cases where the strict project>service>subcommand structure isn't really suitable. It'd be an additional feature for heimdall, !help wouldn't be hardcoded (or even provided by the core program) and in my opinion it would solve this issue.

On the other hand !help (or --help for that matter) should be a central part of every chat bot or TUI and it'd make sense to hardcode it.

.
.
.

Regarding the first part of your message about what exactly !help itself does regardless of implementation my suggestion would be:

!help prints generic text about the command itself and a list of projects
!help <project> list of services
!help <project> <service> list of subcommands
!help <project> <service> <subcommand> display usage

Also I'd print as much of a command as possible (for example !lubiland infrastructure instead of infrastructure).

With this approach you would also be able to take any command (e.g. out of the room history) and just prepend !help to show .usage

Yeah, the information is there. In .usage normally there is the usage for the arguments itself and everything else can be found in commands.projects and children. I thought about aliases, because they may become handy in future in other cases where the strict project>service>subcommand structure isn't really suitable. It'd be an additional feature for heimdall, !help wouldn't be hardcoded (or even provided by the core program) and in my opinion it would solve this issue. On the other hand !help (or --help for that matter) should be a central part of every chat bot or TUI and it'd make sense to hardcode it. . . . Regarding the first part of your message about what exactly !help itself does regardless of implementation my suggestion would be: `!help` prints generic text about the command itself and a list of projects `!help <project>` list of services `!help <project> <service>` list of subcommands `!help <project> <service> <subcommand>` display usage Also I'd print as much of a command as possible (for example `!lubiland infrastructure` instead of `infrastructure`). With this approach you would also be able to take any command (e.g. out of the room history) and just prepend !help to show .usage
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
2 Participants
Total Time Spent: 2 seconds
lub
2 seconds
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lubiland/heimdall#7
Loading…
There is no content yet.