diff options
Diffstat (limited to 'src/ex_cmds.h')
-rw-r--r-- | src/ex_cmds.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/ex_cmds.h b/src/ex_cmds.h index fcf15ba60f..c2657b0ff3 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -57,6 +57,7 @@ // buffer when curbuf_lock is set #define EX_NONWHITE_OK 0x2000000 // command can be followed by non-white #define EX_KEEPSCRIPT 0x4000000 // keep sctx of where command was invoked +#define EX_EXPR_ARG 0x8000000 // argument is an expression #define EX_FILES (EX_XFILE | EX_EXTRA) // multiple extra files allowed #define EX_FILE1 (EX_FILES | EX_NOSPC) // 1 file, defaults to current file @@ -265,7 +266,7 @@ EXCMD(CMD_caddbuffer, "caddbuffer", ex_cbuffer, EX_RANGE|EX_WORD1|EX_TRLBAR, ADDR_OTHER), EXCMD(CMD_caddexpr, "caddexpr", ex_cexpr, - EX_NEEDARG|EX_WORD1|EX_NOTRLCOM, + EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_EXPR_ARG, ADDR_NONE), EXCMD(CMD_caddfile, "caddfile", ex_cfile, EX_TRLBAR|EX_FILE1, @@ -274,7 +275,7 @@ EXCMD(CMD_cafter, "cafter", ex_cbelow, EX_RANGE|EX_COUNT|EX_TRLBAR, ADDR_UNSIGNED), EXCMD(CMD_call, "call", ex_call, - EX_RANGE|EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_RANGE|EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_LINES), EXCMD(CMD_catch, "catch", ex_catch, EX_EXTRA|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, @@ -307,7 +308,7 @@ EXCMD(CMD_center, "center", ex_align, EX_TRLBAR|EX_RANGE|EX_WHOLEFOLD|EX_EXTRA|EX_CMDWIN|EX_LOCK_OK|EX_MODIFY, ADDR_LINES), EXCMD(CMD_cexpr, "cexpr", ex_cexpr, - EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_BANG, + EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_EXPR_ARG|EX_BANG, ADDR_NONE), EXCMD(CMD_cfile, "cfile", ex_cfile, EX_TRLBAR|EX_FILE1|EX_BANG, @@ -325,7 +326,7 @@ EXCMD(CMD_cgetbuffer, "cgetbuffer", ex_cbuffer, EX_RANGE|EX_WORD1|EX_TRLBAR, ADDR_OTHER), EXCMD(CMD_cgetexpr, "cgetexpr", ex_cexpr, - EX_NEEDARG|EX_WORD1|EX_NOTRLCOM, + EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_EXPR_ARG, ADDR_NONE), EXCMD(CMD_chdir, "chdir", ex_cd, EX_BANG|EX_FILE1|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK, @@ -409,7 +410,7 @@ EXCMD(CMD_confirm, "confirm", ex_wrongmodifier, EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_const, "const", ex_let, - EX_EXTRA|EX_BANG|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_BANG|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_copen, "copen", ex_copen, EX_RANGE|EX_COUNT|EX_TRLBAR, @@ -526,28 +527,28 @@ EXCMD(CMD_earlier, "earlier", ex_later, EX_TRLBAR|EX_EXTRA|EX_NOSPC|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_echo, "echo", ex_echo, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_echoerr, "echoerr", ex_execute, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_echohl, "echohl", ex_echohl, EX_EXTRA|EX_TRLBAR|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_echomsg, "echomsg", ex_execute, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_echoconsole, "echoconsole", ex_execute, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_echon, "echon", ex_echo, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_else, "else", ex_else, EX_TRLBAR|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_elseif, "elseif", ex_else, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_emenu, "emenu", ex_emenu, EX_NEEDARG|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_RANGE|EX_CMDWIN|EX_LOCK_OK, @@ -586,19 +587,19 @@ EXCMD(CMD_enum, "enum", ex_ni, EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_eval, "eval", ex_eval, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_ex, "ex", ex_edit, EX_BANG|EX_FILE1|EX_CMDARG|EX_ARGOPT|EX_TRLBAR, ADDR_NONE), EXCMD(CMD_execute, "execute", ex_execute, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_exit, "exit", ex_exit, EX_RANGE|EX_WHOLEFOLD|EX_BANG|EX_FILE1|EX_ARGOPT|EX_DFLALL|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK, ADDR_LINES), EXCMD(CMD_export, "export", ex_export, - EX_EXTRA|EX_NOTRLCOM|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_exusage, "exusage", ex_exusage, EX_TRLBAR, @@ -649,7 +650,7 @@ EXCMD(CMD_foldopen, "foldopen", ex_foldopen, EX_RANGE|EX_BANG|EX_WHOLEFOLD|EX_TRLBAR|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_LINES), EXCMD(CMD_for, "for", ex_while, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_function, "function", ex_function, EX_EXTRA|EX_BANG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, @@ -709,7 +710,7 @@ EXCMD(CMD_iabclear, "iabclear", ex_abclear, EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_if, "if", ex_if, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_ijump, "ijump", ex_findpat, EX_BANG|EX_RANGE|EX_DFLALL|EX_WHOLEFOLD|EX_EXTRA, @@ -799,7 +800,7 @@ EXCMD(CMD_language, "language", ex_language, EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_laddexpr, "laddexpr", ex_cexpr, - EX_NEEDARG|EX_WORD1|EX_NOTRLCOM, + EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_EXPR_ARG, ADDR_NONE), EXCMD(CMD_laddbuffer, "laddbuffer", ex_cbuffer, EX_RANGE|EX_WORD1|EX_TRLBAR, @@ -847,10 +848,10 @@ EXCMD(CMD_leftabove, "leftabove", ex_wrongmodifier, EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM, ADDR_NONE), EXCMD(CMD_let, "let", ex_let, - EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, + EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_lexpr, "lexpr", ex_cexpr, - EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_BANG, + EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_EXPR_ARG|EX_BANG, ADDR_NONE), EXCMD(CMD_legacy, "legacy", ex_wrongmodifier, EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM|EX_CMDWIN|EX_LOCK_OK, @@ -871,7 +872,7 @@ EXCMD(CMD_lgetbuffer, "lgetbuffer", ex_cbuffer, EX_RANGE|EX_WORD1|EX_TRLBAR, ADDR_OTHER), EXCMD(CMD_lgetexpr, "lgetexpr", ex_cexpr, - EX_NEEDARG|EX_WORD1|EX_NOTRLCOM, + EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_EXPR_ARG, ADDR_NONE), EXCMD(CMD_lgrep, "lgrep", ex_make, EX_RANGE|EX_BANG|EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM|EX_TRLBAR|EX_XFILE, |