diff options
author | Rui Abreu Ferreira <raf-ep@gmx.com> | 2014-05-29 15:42:08 +0100 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-02 10:34:51 -0300 |
commit | 1971cc30b50ba77f55c7693eff716e564ce5c8e2 (patch) | |
tree | 968532dd50b8bb9264257e94e5986debcd48c178 /src | |
parent | a2e9580801e89f8fa6e1e3f0ccb3d4a740d7ac03 (diff) | |
download | rneovim-1971cc30b50ba77f55c7693eff716e564ce5c8e2.tar.gz rneovim-1971cc30b50ba77f55c7693eff716e564ce5c8e2.tar.bz2 rneovim-1971cc30b50ba77f55c7693eff716e564ce5c8e2.zip |
Add --api-metadata command line option
- New command line option prints the binary API metadata object
and exits
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index ffb83ae7d8..97fc5b0712 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -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")); |