mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00
Add --api-metadata command line option
- New command line option prints the binary API metadata object and exits
This commit is contained in:

committed by
Thiago de Arruda

parent
a2e9580801
commit
1971cc30b5
@@ -135,6 +135,8 @@ static void check_swap_exists_action(void);
|
||||
# endif
|
||||
#endif /* NO_VIM_MAIN */
|
||||
|
||||
extern const uint8_t msgpack_metadata[];
|
||||
extern const unsigned int msgpack_metadata_size;
|
||||
|
||||
/*
|
||||
* Different types of error messages.
|
||||
@@ -1047,6 +1049,11 @@ static void command_line_scan(mparm_T *parmp)
|
||||
msg_putchar('\n');
|
||||
msg_didout = FALSE;
|
||||
mch_exit(0);
|
||||
} else if (STRICMP(argv[0] + argv_idx, "api-metadata") == 0) {
|
||||
for (unsigned int i = 0; i<msgpack_metadata_size; i++) {
|
||||
putchar(msgpack_metadata[i]);
|
||||
}
|
||||
mch_exit(0);
|
||||
} else if (STRNICMP(argv[0] + argv_idx, "literal", 7) == 0) {
|
||||
#if !defined(UNIX)
|
||||
parmp->literal = TRUE;
|
||||
@@ -2240,6 +2247,7 @@ static void usage(void)
|
||||
main_msg(_("--startuptime <file>\tWrite startup timing messages to <file>"));
|
||||
#endif
|
||||
main_msg(_("-i <viminfo>\t\tUse <viminfo> instead of .viminfo"));
|
||||
main_msg(_("--api-metadata\tDump API metadata information and exit"));
|
||||
main_msg(_("-h or --help\tPrint Help (this message) and exit"));
|
||||
main_msg(_("--version\t\tPrint version information and exit"));
|
||||
|
||||
|
Reference in New Issue
Block a user