Commit: runtime(doc): rewrite mkdir() doc and simplify {flags} meaning

3 views
Skip to first unread message

Christian Brabandt

unread,
Jun 13, 2024, 3:30:12 PM6/13/24
to vim...@googlegroups.com
runtime(doc): rewrite mkdir() doc and simplify {flags} meaning

Commit: https://github.com/vim/vim/commit/d6d4e1333659c0d2acee3133819498d014df47de
Author: Christian Brabandt <c...@256bit.org>
Date: Thu Jun 13 21:21:41 2024 +0200

runtime(doc): rewrite mkdir() doc and simplify {flags} meaning

related: https://github.com/vim/vim/issues/14991

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index dd46430e9..862a1dfc6 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -7329,17 +7329,14 @@ mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E739*
When {flags} is present it must be a string. An empty string
has no effect.

- If {flags} contains "p" then intermediate directories are
- created as necessary.
-
- If {flags} contains "D" then {name} is deleted at the end of
- the current function, as with: >
- defer delete({name}, 'd')
-<
- If {flags} contains "R" then {name} is deleted recursively at
- the end of the current function, as with: >
- defer delete({name}, 'rf')
-< Note that when {name} has more than one part and "p" is used
+ {flags} can contain these character flags:
+ "p" intermediate directories will be created as necessary
+ "D" {name} will be deleted at the end of the current
+ function, but not recursively |defer|
+ "R" {name} will be deleted recursively at the end of the
+ current function |defer|
+
+ Note that when {name} has more than one part and "p" is used
some directories may already exist. Only the first one that
is created and what it contains is scheduled to be deleted.
E.g. when using: >
Reply all
Reply to author
Forward
0 new messages