summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2016-10-11 10:28:45 +0300
committerFrank LENORMAND <lenormf@gmail.com>2016-10-11 10:39:20 +0300
commitf7e2bfd76fc1629ffd4e1664eff3de2bb3935bed (patch)
treeb4e4ccf0807f1ce72d9e584a16f00fa9edc94004
parentf6a2925950baa85d6b3835e6f418bbecd11a9295 (diff)
Document the optional parameter of the `cd` command
-rw-r--r--README.asciidoc2
-rw-r--r--doc/manpages/commands.asciidoc5
-rw-r--r--src/commands.cc2
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 <directory>`: change the current directory to the one passed
+ * `cd [<directory>]`: change the current directory to `<directory>`, or the home directory is unspecified
* `e[dit][!] <filename> [<line> [<column>]]`: 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* <directory>::
- change the current directory to the one passed
+*cd* [<directory>]::
+ change the current directory to *directory*, or the home directory if
+ unspecified
*e[dit][!]* <filename> [<line> [<column>]]::
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 <dir>: change server working directory to <dir>",
+ "cd [<directory>]: change the server's working directory to <directory>, or the home directory if unspecified",
single_optional_name_param,
CommandFlags::None,
CommandHelper{},