From abb57ff0176f333f09fe77e82c916b28c3fc8eb3 Mon Sep 17 00:00:00 2001 From: vpsx <19900057+vpsx@users.noreply.github.com> Date: Wed, 12 Feb 2020 10:59:37 -0600 Subject: [PATCH] terminal/docgen: Specify all possible config locations (#1859) Changes docs to reflect different possible locations for config/history files. --- Documentation/cli/README.md | 9 +++------ pkg/terminal/docgen.go | 11 +++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Documentation/cli/README.md b/Documentation/cli/README.md index 847e32e0..4b06177a 100644 --- a/Documentation/cli/README.md +++ b/Documentation/cli/README.md @@ -1,11 +1,8 @@ -# Configuration +# Configuration and Command History -Delve can be configured via the configuration file located in `$HOME/.config/dlv/config.yml`. -You can open the file and discover all the configurable options and their default value. +If `$XDG_CONFIG_HOME` is set, then configuration and command history files are located in `$XDG_CONFIG_HOME/dlv`. Otherwise, they are located in `$HOME/.config/dlv` on Linux and `$HOME/.dlv` on other systems. -# History - -The command history of delve debugger is stored in `$HOME/.config/dlv/.dbg_history`. +The configuration file `config.yml` contains all the configurable options and their default values. The command history is stored in `.dbg_history`. # Commands diff --git a/pkg/terminal/docgen.go b/pkg/terminal/docgen.go index f04d7d76..04972186 100644 --- a/pkg/terminal/docgen.go +++ b/pkg/terminal/docgen.go @@ -27,12 +27,11 @@ func replaceDocPath(s string) string { } func (commands *Commands) WriteMarkdown(w io.Writer) { - fmt.Fprint(w, "# Configuration\n\n") - fmt.Fprint(w, "Delve can be configured via the configuration file located in `$HOME/.config/dlv/config.yml`.\n") - fmt.Fprint(w, "You can open the file and discover all the configurable options and their default value.\n\n") - - fmt.Fprint(w, "# History\n\n") - fmt.Fprint(w, "The command history of delve debugger is stored in `$HOME/.config/dlv/.dbg_history`.\n\n") + fmt.Fprint(w, "# Configuration and Command History\n\n") + fmt.Fprint(w, "If `$XDG_CONFIG_HOME` is set, then configuration and command history files are located in `$XDG_CONFIG_HOME/dlv`. ") + fmt.Fprint(w, "Otherwise, they are located in `$HOME/.config/dlv` on Linux and `$HOME/.dlv` on other systems.\n\n") + fmt.Fprint(w, "The configuration file `config.yml` contains all the configurable options and their default values. ") + fmt.Fprint(w, "The command history is stored in `.dbg_history`.\n\n") fmt.Fprint(w, "# Commands\n\n")