mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
ex_cmds: verify invalid command name
This commit is contained in:
parent
7685fc9ecd
commit
b6ff02e27b
@ -1464,17 +1464,15 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
||||
if (ea.cmdidx == CMD_SIZE) {
|
||||
if (!ea.skip) {
|
||||
STRCPY(IObuff, _("E492: Not an editor command"));
|
||||
// If the modifier was parsed OK the error must be in the following
|
||||
// command
|
||||
char_u *cmdname = after_modifier ? after_modifier : *cmdlinep;
|
||||
if (!(flags & DOCMD_VERBOSE)) {
|
||||
// If the modifier was parsed OK the error must be in the following
|
||||
// command
|
||||
if (after_modifier != NULL) {
|
||||
append_command(after_modifier);
|
||||
} else {
|
||||
append_command(*cmdlinep);
|
||||
}
|
||||
append_command(cmdname);
|
||||
}
|
||||
errormsg = IObuff;
|
||||
did_emsg_syntax = TRUE;
|
||||
did_emsg_syntax = true;
|
||||
verify_command(cmdname);
|
||||
}
|
||||
goto doend;
|
||||
}
|
||||
@ -9626,3 +9624,293 @@ Dictionary commands_array(buf_T *buf)
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
void verify_command(char_u *cmd)
|
||||
{
|
||||
if (strcmp("smile", (char *)cmd)) {
|
||||
return; // acceptable non-existing command
|
||||
}
|
||||
MSG(" #xxn` #xnxx` ,+x@##@Mz;` .xxx"
|
||||
"xxxxxxnz+, znnnnnnnnnnnnnnnn.");
|
||||
MSG(" n###z x####` :x##########W+` ,###"
|
||||
"##########M; W################.");
|
||||
MSG(" n####; x####` `z##############W: ,###"
|
||||
"############# W################.");
|
||||
MSG(" n####W. x####` ,W#################+ ,###"
|
||||
"############## W################.");
|
||||
MSG(" n#####n x####` @################### ,###"
|
||||
"##############i W################.");
|
||||
MSG(" n######i x####` .#########@W@########* ,###"
|
||||
"##############W`W################.");
|
||||
MSG(" n######@. x####` x######W*. `;n#######: ,###"
|
||||
"#x,,,,:*M######iW###@:,,,,,,,,,,,`");
|
||||
MSG(" n#######n x####` *######+` :M#####M ,###"
|
||||
"#n `x#####xW###@`");
|
||||
MSG(" n########* x####``@####@; `x#####i ,###"
|
||||
"#n ,#####@W###@`");
|
||||
MSG(" n########@ x####`*#####i `M####M ,###"
|
||||
"#n x#########@`");
|
||||
MSG(" n######### x####`M####z :#####:,###"
|
||||
"#n z#########@`");
|
||||
MSG(" n#########* x####,#####. n####+,###"
|
||||
"#n n#########@`");
|
||||
MSG(" n####@####@, x####i####x ;####x,###"
|
||||
"#n `W#####@####+++++++++++i");
|
||||
MSG(" n####*#####M` x#########* `####@,###"
|
||||
"#n i#####MW###############W");
|
||||
MSG(" n####.######+ x####z####; W####,###"
|
||||
"#n i@######W###############W");
|
||||
MSG(" n####.`W#####: x####n####: M####:###"
|
||||
"#@nnnnnW#######,W###############W");
|
||||
MSG(" n####. :#####M`x####z####; W####,###"
|
||||
"##############z W###############W");
|
||||
MSG(" n####. #######x#########* `####W,###"
|
||||
"#############W` W###############W");
|
||||
MSG(" n####. `M#####W####i####x ;####x,###"
|
||||
"############W, W####+**********i");
|
||||
MSG(" n####. ,##########,#####. n####+,###"
|
||||
"###########n. W###@`");
|
||||
MSG(" n####. ##########`M####z :#####:,###"
|
||||
"########Wz: W###@`");
|
||||
MSG(" n####. x#########`*#####i `M####M ,###"
|
||||
"#x.....` W###@`");
|
||||
MSG(" n####. ,@########``@####@; `x#####i ,###"
|
||||
"#n W###@`");
|
||||
MSG(" n####. *########` *#####@+` ,M#####M ,###"
|
||||
"#n W###@`");
|
||||
MSG(" n####. x#######` x######W*. `;n######@: ,###"
|
||||
"#n W###@,,,,,,,,,,,,`");
|
||||
MSG(" n####. .@######` .#########@W@########* ,###"
|
||||
"#n W################,");
|
||||
MSG(" n####. i######` @################### ,###"
|
||||
"#n W################,");
|
||||
MSG(" n####. n#####` ,W#################+ ,###"
|
||||
"#n W################,");
|
||||
MSG(" n####. .@####` .n##############W; ,###"
|
||||
"#n W################,");
|
||||
MSG(" n####. i####` :x##########W+` ,###"
|
||||
"#n W################,");
|
||||
MSG(" +nnnn` +nnn` ,+x@##@Mz;` .nnn"
|
||||
"n+ zxxxxxxxxxxxxxxxx.");
|
||||
MSG(" ");
|
||||
MSG(" "
|
||||
" ,+M@#Mi");
|
||||
MSG(" "
|
||||
" .z########");
|
||||
MSG(" "
|
||||
" i@#########i");
|
||||
MSG(" "
|
||||
" `############W`");
|
||||
MSG(" "
|
||||
" `n#############i");
|
||||
MSG(" "
|
||||
" `n##############n");
|
||||
MSG(" `` "
|
||||
" z###############@`");
|
||||
MSG(" `W@z, "
|
||||
" ##################,");
|
||||
MSG(" *#####` "
|
||||
" i############@x@###i");
|
||||
MSG(" ######M. "
|
||||
" :#############n`,W##+");
|
||||
MSG(" +######@: "
|
||||
" .W#########M@##+ *##z");
|
||||
MSG(" :#######@: "
|
||||
" `x########@#x###* ,##n");
|
||||
MSG(" `@#######@; "
|
||||
" z#########M*@nW#i .##x");
|
||||
MSG(" z########@i "
|
||||
" *###########WM#@#, `##x");
|
||||
MSG(" i##########+ "
|
||||
" ;###########*n###@ `##x");
|
||||
MSG(" `@#MM#######x, "
|
||||
" ,@#########zM,`z##M `@#x");
|
||||
MSG(" n##M#W#######n. "
|
||||
" `.:i*+#zzzz##+i:.` ,W#########Wii,`n@#@` n@##n");
|
||||
MSG(" ;###@#x#######n `,i"
|
||||
"#nW@#####@@WWW@@####@Mzi. ,W##########@z.. ;zM#+i####z");
|
||||
MSG(" x####nz######## .;#x@##"
|
||||
"@Wn#*;,.` ``,:*#x@##M+, ;@########xz@WM+#` `n@#######");
|
||||
MSG(" ,@####M########xi#@##@Mzi,"
|
||||
"` .+x###Mi:n##########Mz```.:i *@######*");
|
||||
MSG(" *#####W#########ix+:` "
|
||||
" :n#############z: `*.`M######i");
|
||||
MSG(" i#W##nW@+@##@#M@; "
|
||||
" ;W@@##########W, i`x@#####,");
|
||||
MSG(" `@@n@Wn#@iMW*#*: "
|
||||
" `iz#z@######x. M######`");
|
||||
MSG(" z##zM###x`*, .` "
|
||||
" `iW#####W;:` +#####M");
|
||||
MSG(" ,###nn##n` "
|
||||
" ,#####x;` ,;@######");
|
||||
MSG(" x###xz#. "
|
||||
" in###+ `:######@.");
|
||||
MSG(" ;####n+ "
|
||||
" `Mnx##xi` , zM#######");
|
||||
MSG(" `W####+ "
|
||||
"i. `.+x###@#. :n,z######:");
|
||||
MSG(" z####@` ;"
|
||||
"#: .ii@###@;.*M*z####@`");
|
||||
MSG(" i####M ` `i@"
|
||||
"#, :: +#n##@+@##W####n");
|
||||
MSG(" :####x ,i. ##xzM###"
|
||||
"@` i. .@@, .z####x#######*");
|
||||
MSG(" ,###W; i##Wz########"
|
||||
"# :## z##n ,@########x###:");
|
||||
MSG(" n##n `W###########M"
|
||||
"`;n, i#x ,###@i *W########W#@`");
|
||||
MSG(" .@##+ `x###########@."
|
||||
" z#+ .M#W``x#####n` `;#######@z#x");
|
||||
MSG(" n###z :W############@ "
|
||||
" z#* @##xM#######@n; `########nW+");
|
||||
MSG(" ;####nW##############W "
|
||||
":@#* `@#############* :########z@i`");
|
||||
MSG(" M##################### "
|
||||
"M##: @#############@: *W########M#");
|
||||
MSG(" ;#####################i."
|
||||
"##x` W#############W, :n########zx");
|
||||
MSG(" x####################@.`"
|
||||
"x; @#############z. .@########W#");
|
||||
MSG(" ,######################` "
|
||||
" W###############x*,` W######zM#i");
|
||||
MSG(" #######################: "
|
||||
" z##################@x+*#zzi `@#########.");
|
||||
MSG(" W########W#z#M#########; "
|
||||
" *##########################z :@#######@`");
|
||||
MSG(" `@#######x`;#z ,x#######; "
|
||||
" z###########M###xnM@########* :M######@");
|
||||
MSG(" i########, x#@` z######; "
|
||||
" *##########i *#@` `+########+` n######.");
|
||||
MSG(" n#######@` M##, `W#####. "
|
||||
" *#########z ###; z########M: :W####n");
|
||||
MSG(" M#######M n##. x####x "
|
||||
" `x########: z##+ M#########@; .n###+");
|
||||
MSG(" W#######@` :#W `@####: "
|
||||
" `@######W i### ;###########@. n##n");
|
||||
MSG(" W########z` ,, .x####z "
|
||||
" @######@` `W#; `W############* *###;");
|
||||
MSG(" `@#########Mi,:*n@####W` "
|
||||
" W#######* .. `n#############i i###x");
|
||||
MSG(" .#####################z "
|
||||
" `@#######@*` .x############n:` ;####.");
|
||||
MSG(" :####################x`,,` "
|
||||
" `W#########@x#+#@#############i ,####:");
|
||||
MSG(" ;###################x#@###x"
|
||||
"i` *############################: `####i");
|
||||
MSG(" i##################+#######"
|
||||
"#M, x##########################@` W###i");
|
||||
MSG(" *################@; @######"
|
||||
"##@, .W#########################@ x###:");
|
||||
MSG(" .+M#############z. M######"
|
||||
"###x ,W########################@` ####.");
|
||||
MSG(" *M*;z@########x: :W#####"
|
||||
"##i .M########################i i###:");
|
||||
MSG(" *##@z;#@####x: :z###"
|
||||
"@i `########################x .###;");
|
||||
MSG(" *#####n;#@## ;##"
|
||||
"* ,x#####################@` W##*");
|
||||
MSG(" *#######n;* :M##"
|
||||
"W*, *W####################` n##z");
|
||||
MSG(" i########@. ,*n####"
|
||||
"###M*` `###################M *##M");
|
||||
MSG(" i########n `z#####@@"
|
||||
"#####Wi ,M################; ,##@`");
|
||||
MSG(" ;WMWW@###* .x##@ni.``"
|
||||
".:+zW##z` `n##############z @##,");
|
||||
MSG(" .*++*i;;;. .M#@+` "
|
||||
" .##n `x############x` n##i");
|
||||
MSG(" :########* x#W, "
|
||||
" *#+ *###########M` +##+");
|
||||
MSG(" ,######### :#@: "
|
||||
" ##: #nzzzzzzzzzz. :##x");
|
||||
MSG(" .#####Wz+` ##+ "
|
||||
" `MM` .znnnnnnnnn. `@#@`");
|
||||
MSG(" `@@ni;*nMz` @W` "
|
||||
" :#+ .x#######n x##,");
|
||||
MSG(" i;z@#####, .#* "
|
||||
" z#: ;;;*zW##; ###i");
|
||||
MSG(" z########: :#; "
|
||||
" `Wx +###Wni;n. ;##z");
|
||||
MSG(" n########W: .#* "
|
||||
" ,#, ;#######@+ `@#M");
|
||||
MSG(" .###########n;.MM "
|
||||
" n* ;iM#######* x#@`");
|
||||
MSG(" :#############@;; "
|
||||
" .n` ,#W*iW#####W` +##,");
|
||||
MSG(" ,##############. "
|
||||
" ix. `x###M;####### ,##i");
|
||||
MSG(" .#############@` "
|
||||
" x@n**#W######z;M###@. W##");
|
||||
MSG(" .##############W: "
|
||||
" .x############@*;zW#; z#x");
|
||||
MSG(" ,###############@; "
|
||||
" `##############@n*;. i#@");
|
||||
MSG(" ,#################i "
|
||||
" :n##############W` .##,");
|
||||
MSG(" ,###################` "
|
||||
" .+W##########W, `##i");
|
||||
MSG(" :###################@zi,` "
|
||||
" ;zM@@@WMn*` @#z");
|
||||
MSG(" :#######################@x+"
|
||||
"*i;;:i#M, `` M#W");
|
||||
MSG(" ;##########################"
|
||||
"######@x. n##,");
|
||||
MSG(" i#####################@W@@@"
|
||||
"@Wxz*:` *##+");
|
||||
MSG(" *######################+```"
|
||||
" :##M");
|
||||
MSG(" ########################M; "
|
||||
" `@##,");
|
||||
MSG(" z#########################x"
|
||||
", z###");
|
||||
MSG(" n##########################"
|
||||
"#n: ;##W`");
|
||||
MSG(" x##########################"
|
||||
"###Mz#++##* `W##i");
|
||||
MSG(" M##########################"
|
||||
"##########@` ###x");
|
||||
MSG(" W##########################"
|
||||
"###########` .###,");
|
||||
MSG(" @##########################"
|
||||
"##########M n##z");
|
||||
MSG(" @##################z*i@WMMM"
|
||||
"x#x@#####,. :##@.");
|
||||
MSG(" `#####################@xi` "
|
||||
" `::,* x##+");
|
||||
MSG(" .#####################@#M. "
|
||||
" ;##@`");
|
||||
MSG(" ,#####################:. "
|
||||
" M##i");
|
||||
MSG(" ;###################ni` "
|
||||
" i##M");
|
||||
MSG(" *#################W#` "
|
||||
" `W##,");
|
||||
MSG(" z#################@Wx+. "
|
||||
" +###");
|
||||
MSG(" x######################z. "
|
||||
" .@#@`");
|
||||
MSG(" `@#######################@; "
|
||||
" z##;");
|
||||
MSG(" :##########################: "
|
||||
" :##z");
|
||||
MSG(" +#########################W# "
|
||||
" M#W");
|
||||
MSG(" W################@n+*i;:,` "
|
||||
" +##,");
|
||||
MSG(" :##################WMxz+, "
|
||||
" ,##i");
|
||||
MSG(" n#######################W.., "
|
||||
" W##");
|
||||
MSG(" +#########################WW@+. .:. "
|
||||
" z#x");
|
||||
MSG(" `@#############################@@###: "
|
||||
" *#W");
|
||||
MSG(" #################################Wz: "
|
||||
" :#@");
|
||||
MSG(",@###############################i "
|
||||
" .##");
|
||||
MSG("n@@@@@@@#########################+ "
|
||||
" `##");
|
||||
MSG("` `.:.`.,:iii;;;;;;;;iii;;;:` `.`` "
|
||||
" `nW");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user