diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-15 06:04:13 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-06-15 06:05:33 +0800 |
commit | f557a985ef47057398899a7270beb26e8f71771c (patch) | |
tree | 584715faa57d742cabfa018998ef19bf91065a56 | |
parent | 0600754d8d24457d23c3eb1d9c89b1d30c429ad0 (diff) | |
download | rneovim-f557a985ef47057398899a7270beb26e8f71771c.tar.gz rneovim-f557a985ef47057398899a7270beb26e8f71771c.tar.bz2 rneovim-f557a985ef47057398899a7270beb26e8f71771c.zip |
vim-patch:d6d4e13: runtime(doc): rewrite mkdir() doc and simplify {flags} meaning
related: vim/vim#14991
https://github.com/vim/vim/commit/d6d4e1333659c0d2acee3133819498d014df47de
Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r-- | runtime/doc/builtin.txt | 19 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 19 | ||||
-rw-r--r-- | src/nvim/eval.lua | 19 |
3 files changed, 24 insertions, 33 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 1472296bd9..3740bcf5db 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -4994,17 +4994,14 @@ mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E73 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: >vim - defer delete({name}, 'd') -< - If {flags} contains "R" then {name} is deleted recursively at - the end of the current function, as with: >vim - 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: >vim diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index f868aec423..3ef96a5f47 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -6007,17 +6007,14 @@ function vim.fn.min(expr) end --- 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: >vim ---- defer delete({name}, 'd') ---- < ---- If {flags} contains "R" then {name} is deleted recursively at ---- the end of the current function, as with: >vim ---- 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: >vim diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 93a2bce2a5..ec2bfed9e4 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -7264,17 +7264,14 @@ M.funcs = { 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: >vim - defer delete({name}, 'd') - < - If {flags} contains "R" then {name} is deleted recursively at - the end of the current function, as with: >vim - 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: >vim |