mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 14:55:38 -04:00
action/command: Allow multiple help
pages to be opened
This commit is contained in:
parent
26f0806915
commit
2c62d4b70c
@ -488,13 +488,15 @@ func (h *BufPane) HelpCmd(args []string) {
|
||||
forceSplit = true
|
||||
}
|
||||
|
||||
if config.FindRuntimeFile(config.RTHelp, topics[0]) != nil {
|
||||
err := h.openHelp(topics[0], hsplit, forceSplit)
|
||||
if err != nil {
|
||||
InfoBar.Error(err)
|
||||
for _, topic := range topics {
|
||||
if config.FindRuntimeFile(config.RTHelp, topic) != nil {
|
||||
err := h.openHelp(topic, hsplit, forceSplit)
|
||||
if err != nil {
|
||||
InfoBar.Error(err)
|
||||
}
|
||||
} else {
|
||||
InfoBar.Error("Sorry, no help for ", topic)
|
||||
}
|
||||
} else {
|
||||
InfoBar.Error("Sorry, no help for ", topics[0])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,8 +21,9 @@ quotes here but these are not necessary when entering the command in micro.
|
||||
This command will modify `bindings.json` and overwrite any bindings to
|
||||
`key` that already exist.
|
||||
|
||||
* `help ['topic'] ['flags']`: opens the corresponding help topic.
|
||||
If no topic is provided opens the default help screen.
|
||||
* `help ['topic'] ['flags']`: opens the corresponding help topics.
|
||||
If no topic is provided opens the default help screen. If multiple topics are
|
||||
provided (separated via ` `) they are opened all as splits.
|
||||
Help topics are stored as `.md` files in the `runtime/help` directory of
|
||||
the source tree, which is embedded in the final binary.
|
||||
The `flags` are optional.
|
||||
|
Loading…
Reference in New Issue
Block a user