📄 cli.c
字号:
#include <stdio.h>#include <string.h>#include <signal.h>#include "vtysh.h"#include "command.h"#include "usrsys.h"#if 1#include "version.h"#endifintmain ( int argc, char ** argv ){ /* Disable CTRL-C */ signal(SIGINT, SIG_IGN);#if 1 // cli version printf("VIA CLI version: %s\n", CLI_VERSION);#endif /* Check command-line arguments */ if (argc == 2) { if (strcmp(argv[1], "init") == 0) { cli_on_init(); /* initialize from flash configurations then exit */ /* this part is used to initialize switch settings */ U_SysInitFromFlashAllStart(); // 2007-1-26 SteveLin commented, for testing return 0; } } /* Initialization */ vtysh_init(); /* Main command loop */ vtysh_cmd_loop(); printf("\n"); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -