Mercurial > vim
comparison runtime/doc/builtin.txt @ 28283:2fd2ce8a556c v8.2.4667
patch 8.2.4667: expandcmd() fails on an error
Commit: https://github.com/vim/vim/commit/5018a836c030988944a9bbe2fd2e538bf5261a72
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sat Apr 2 21:12:21 2022 +0100
patch 8.2.4667: expandcmd() fails on an error
Problem: expandcmd() fails on an error.
Solution: On failure return the command unmodified. (yegappan Lakshmanan,
closes #10063)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 02 Apr 2022 22:15:03 +0200 |
parents | e3d6184b89fa |
children | 425700af491b |
comparison
equal
deleted
inserted
replaced
28282:548b4ab77157 | 28283:2fd2ce8a556c |
---|---|
2297 Expand special items in String {string} like what is done for | 2297 Expand special items in String {string} like what is done for |
2298 an Ex command such as `:edit`. This expands special keywords, | 2298 an Ex command such as `:edit`. This expands special keywords, |
2299 like with |expand()|, and environment variables, anywhere in | 2299 like with |expand()|, and environment variables, anywhere in |
2300 {string}. "~user" and "~/path" are only expanded at the | 2300 {string}. "~user" and "~/path" are only expanded at the |
2301 start. | 2301 start. |
2302 Returns the expanded string. Example: > | 2302 Returns the expanded string. If an error is encountered |
2303 during expansion, the unmodified {string} is returned. | |
2304 Example: > | |
2303 :echo expandcmd('make %<.o') | 2305 :echo expandcmd('make %<.o') |
2304 | 2306 < make /path/runtime/doc/builtin.o ~ |
2305 < Can also be used as a |method|: > | 2307 |
2308 Can also be used as a |method|: > | |
2306 GetCommand()->expandcmd() | 2309 GetCommand()->expandcmd() |
2307 < | 2310 < |
2308 extend({expr1}, {expr2} [, {expr3}]) *extend()* | 2311 extend({expr1}, {expr2} [, {expr3}]) *extend()* |
2309 {expr1} and {expr2} must be both |Lists| or both | 2312 {expr1} and {expr2} must be both |Lists| or both |
2310 |Dictionaries|. | 2313 |Dictionaries|. |