From f7e2bfd76fc1629ffd4e1664eff3de2bb3935bed Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Tue, 11 Oct 2016 10:28:45 +0300 Subject: [PATCH] Document the optional parameter of the `cd` command --- README.asciidoc | 2 +- doc/manpages/commands.asciidoc | 5 +++-- src/commands.cc | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 6064e676..275224f6 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -620,7 +620,7 @@ Some commands take an exclamation mark (`!`), which can be used to force the execution of the command (i.e. to quit a modified buffer, the command `q!` has to be used). - * `cd `: change the current directory to the one passed + * `cd []`: change the current directory to ``, or the home directory is unspecified * `e[dit][!] [ []]`: open buffer on file, go to given line and column. If file is already opened, just switch to this file. use edit! to force reloading. diff --git a/doc/manpages/commands.asciidoc b/doc/manpages/commands.asciidoc index c52491b8..80013770 100644 --- a/doc/manpages/commands.asciidoc +++ b/doc/manpages/commands.asciidoc @@ -12,8 +12,9 @@ Some commands take an exclamation mark (*!*), which can be used to force the execution of the command (i.e. to quit a modified buffer, the command *q!* has to be used). -*cd* :: - change the current directory to the one passed +*cd* []:: + change the current directory to *directory*, or the home directory if + unspecified *e[dit][!]* [ []]:: open buffer on file, go to given line and column. If file is already diff --git a/src/commands.cc b/src/commands.cc index 9cf2a75d..0cc27662 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -1958,7 +1958,7 @@ const CommandDesc select_cmd = { const CommandDesc change_working_directory_cmd = { "cd", nullptr, - "cd : change server working directory to ", + "cd []: change the server's working directory to , or the home directory if unspecified", single_optional_name_param, CommandFlags::None, CommandHelper{},