⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 这是一个linux下的Shell.有命令历史和命令提示
💻 CPP
字号:
// main.cpp : Defines the entry point for the console application.//#include "ProgramableShell.h"#include <iostream>using namespace std;int main (int argc, char *argv[]){	ProgramableShell MyLover;	if(argc < 2)	{		while(1)		{			MyLover.getinput_stdin();			while(MyLover.getcommand())			{				MyLover.run();			}			}	}	else	{		int fid = open(argv[1],O_RDONLY);		if(fid<0)		{			cout<<"lover:" <<argv[1]<<"open file fautt"<<endl;			return 1;		}		else		{			MyLover.load(fid);			while(1)			{				MyLover.getinput_file();				while(MyLover.getcommand())				{					MyLover.run();				}				}		}	}	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -