summaryrefslogtreecommitdiff
path: root/runtime/doc/builtin.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r--runtime/doc/builtin.txt18
1 files changed, 14 insertions, 4 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index f2e98298d..08872d04e 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -161,7 +161,8 @@ exists_compiled({expr}) Number |TRUE| if {expr} exists at compile time
exp({expr}) Float exponential of {expr}
expand({expr} [, {nosuf} [, {list}]])
any expand special keywords in {expr}
-expandcmd({expr}) String expand {expr} like with `:edit`
+expandcmd({string} [, {options}])
+ String expand {string} like with `:edit`
extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
extendnew({expr1}, {expr2} [, {expr3}])
@@ -2293,18 +2294,27 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
Can also be used as a |method|: >
Getpattern()->expand()
-expandcmd({string}) *expandcmd()*
+expandcmd({string} [, {options}]) *expandcmd()*
Expand special items in String {string} like what is done for
an Ex command such as `:edit`. This expands special keywords,
like with |expand()|, and environment variables, anywhere in
{string}. "~user" and "~/path" are only expanded at the
start.
+
+ The following items are supported in the {options} Dict
+ argument:
+ errmsg If set to TRUE, error messages are displayed
+ if an error is encountered during expansion.
+ By default, error messages are not displayed.
+
Returns the expanded string. If an error is encountered
during expansion, the unmodified {string} is returned.
+
Example: >
:echo expandcmd('make %<.o')
-< make /path/runtime/doc/builtin.o ~
-
+ make /path/runtime/doc/builtin.o
+ :echo expandcmd('make %<.o', {'errmsg': v:true})
+<
Can also be used as a |method|: >
GetCommand()->expandcmd()
<