From 99a0468b9bec9adeff8078701fa1e78dee019cf2 Mon Sep 17 00:00:00 2001 From: colinnewell Date: Mon, 4 May 2020 17:27:55 +0100 Subject: [PATCH] cmd,Documentation: Add some simple examples for the list command to the help (#2034) --- Documentation/cli/README.md | 7 +++++++ pkg/terminal/command.go | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/cli/README.md b/Documentation/cli/README.md index beedda91..0eac6dd8 100644 --- a/Documentation/cli/README.md +++ b/Documentation/cli/README.md @@ -348,6 +348,13 @@ Show source code. Show source around current point or provided linespec. +For example: + + frame 1 list 69 + list testvariables.go:10000 + list main.main:30 + list 40 + Aliases: ls l ## locals diff --git a/pkg/terminal/command.go b/pkg/terminal/command.go index edbf8fb6..5e9c2e7f 100644 --- a/pkg/terminal/command.go +++ b/pkg/terminal/command.go @@ -263,7 +263,14 @@ When connected to a headless instance started with the --accept-multiclient, pas [goroutine ] [frame ] list [] -Show source around current point or provided linespec.`}, +Show source around current point or provided linespec. + +For example: + + frame 1 list 69 + list testvariables.go:10000 + list main.main:30 + list 40`}, {aliases: []string{"stack", "bt"}, allowedPrefixes: onPrefix, group: stackCmds, cmdFn: stackCommand, helpMsg: `Print stack trace. [goroutine ] [frame ] stack [] [-full] [-offsets] [-defer] [-a ] [-adepth ] [-mode ]