!help command #7

開放中
建立於 8 年前lub · 3 則留言
lub 已留言 8 年前
擁有者

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 將標題從 help command 改為 !help command 8 年前
lub 開始工作 8 年前
lub 結束工作 8 年前
2s
pandro 加入了
Feature
標籤 8 年前
lub 已留言 8 年前
發布者
擁有者

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 已留言 8 年前
協作者

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 已留言 8 年前
發布者
擁有者

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
此存儲庫已封存,您不能在問題上留言。
未選擇里程碑
沒有負責人
2 參與者
總花費時間:2 seconds
lub
2 seconds
截止日期
截止日期無效或超出範圍,請使用「yyyy-mm-dd」的格式。

未設定截止日期。

先決條件

未設定先決條件。

參考: lubiland/heimdall#7
載入中…
尚未有任何內容