当初越执着,过后越心碎,凡人的渴望如同过早开放的花朵,风霜过后,红衰绿减,甚至连根都毁掉了。——《拔魔》
目录
- 前言
- HOLA SOL
- shell输入
- shell输出
- LOGO打印实现
- 其他语言命令行样式
- python
- shell输入
- shell输出
- ruby
- shell输入
- shell输出
- lua
- shell输入
- shell输出
- julia
- shell输入
- shell输出
- 更新sol-shell
\;
\;
\;
# sol
shell输出
sol
\;\\;\\;
LOGO打印实现//显示LOGO
void logo() {
/*
_ _ ___ _ _
| || |/ _ \| | /_\
| __ | (_) | |__ / _ \
|_||_|\___/|____/_/ \_\
__\ \/ __|/ _ \| |
|___> >__ \ (_) | |__
/_/|___/\___/|____|
*/
blueColor();
printf("%-26s", " _ _ ___ _ _"); returnColor(); printf("%-5s%-20s\n", "|", "");
blueColor();
printf("%-26s", " | || |/ _ \| | /_\"); returnColor(); printf("%-5s%-20s\n", "|", "Created by Demllie - 2912156101@foxmail.com");
blueColor();
printf("%-26s", " | __ | (_) | |__ / _ \"); returnColor(); printf("%-5s%-20s\n", "|", "Version-1.5.2 2022/12/30");
blueColor();
printf("%-26s", " |_||_|\___/|____/_/ \_\"); returnColor(); printf("%-5s%-20s\n", "|", "");
cyanColor();
printf("%-26s", " __\ \/ __|/ _ \| |"); returnColor(); printf("%-5s%-20s\n", "|", "Type '?'/'help'/'h'/'H' for help");
cyanColor();
printf("%-26s", " |___> >__ \\ (_) | |__"); returnColor(); printf("%-5s%-20s\n", "|", "");
cyanColor();
printf("%-26s", " /_/|___/\___/|____|"); returnColor(); printf("%-5s%-20s\n", "|", "");
returnColor();
printf("\n");
}
//显示进度条
void bar() {
u8 start_time = nowTime_ms();
char bar[51] = {
'-','-','-','-','-','-', '-','-','-', '-',
'-','-','-','-','-','-', '-','-','-', '-',
'-','-','-','-','-','-', '-','-','-', '-',
'-','-','-','-','-','-', '-','-','-', '-',
'-','-','-','-','-','-', '-','-','-', '-'
};
char* lab = "-\|/";
for (size_t i = 0; i <= 100; ++i) {
printf("[%c][%3lu%%][%-50s][%5llu ms]\r", lab[i % 4], i, bar, (nowTime_ms() - start_time));
Sleep(26);
if (i % 2 == 0)bar[i / 2] = '#';
}
printf("\n");
}
关于shell实现的看这篇 C语言程序设计——自己编写一个简易shell程序
\;\\;\\;
其他语言命令行样式 python shell输入>>> python
help> python
... python
# python
shell输出
python
\;\\;\\;
ruby shell输入irb(main):007:0> ruby
irb(main):008:0* ruby
shell输出
=> ruby
\;\\;\\;
lua shell输入> lua
>> lua
> lua()
> =lua()
shell输出
lua
\;\\;\\;
julia shell输入julia> julia
help?> julia
(@v1.7) pkg> julia
$ julia
shell输出
julia
\;\\;\\;
更新sol-shell不知道选哪个
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)