docs: Documentation for command line frontend (#518)

* documentation: copied old documentation from wiki

* command: better online documentation

Help without arguments prints just a short summary for each command,
help followed by a command prints the command's syntax and a longer
explanation.

* documentation: automatically generate Documentation/cli/README.md
This commit is contained in:
Alessandro Arzilli
2016-04-29 20:58:19 +02:00
committed by Derek Parker
parent c4e01da5ca
commit 82ece54737
9 changed files with 604 additions and 29 deletions

23
scripts/gen-cli-docs.go Normal file
View File

@ -0,0 +1,23 @@
package main
import (
"bufio"
"log"
"os"
"github.com/derekparker/delve/terminal"
)
func main() {
fh, err := os.Create(os.ExpandEnv("$GOPATH/src/github.com/derekparker/delve/Documentation/cli/README.md"))
if err != nil {
log.Fatalf("could not create README.md: %v", err)
}
defer fh.Close()
w := bufio.NewWriter(fh)
defer w.Flush()
commands := terminal.DebugCommands(nil)
commands.WriteMarkdown(w)
}