varch/doc/console.md
2024-07-21 19:02:13 +08:00

44 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 介绍
控制台模块在程序开发和运行中扮演着关键角色,主要用于管理基于字符的应用程序的输入输出。通过控制台模块,开发者能够实现与用户的有效交互,同时对命令行界面进行定制和管理。
## 接口
### 函数
```c
void console_init(void);
```
控制台模块初始化模块函数可以手动调用也可以通过init模块导出调用默认通过导出调用程序运行后直接使用即可。
使用例子:
```
>> cmd -h
Usage:
Enter the command line to execute the corresponding command
OPTIONS
[-l] : Print currently supported commands
[-n] : Print the number of currently supported commands
[-h] : Print help
[-v] : Print version
[-c] : Print the configuration information of the current command module
`argc` : The maximum number of parameters supported for parsing in the input command
`line` : The maximum length supported for parsing in the input command
`count` : The maximum command count supported
>>
>>
>> cmd -l
command list:
@ cmd
@ into
>>
>>
```