mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 15:30:27 +00:00
version+Shell的命令提示符
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
<RemoveBootDebugOutput>False</RemoveBootDebugOutput>
|
<RemoveBootDebugOutput>False</RemoveBootDebugOutput>
|
||||||
<CosmosDisableDebugger>true</CosmosDisableDebugger>
|
<CosmosDisableDebugger>true</CosmosDisableDebugger>
|
||||||
<CosmosDebugLevel>None</CosmosDebugLevel>
|
<CosmosDebugLevel>None</CosmosDebugLevel>
|
||||||
<OptimizationLevel>1</OptimizationLevel>
|
<OptimizationLevel>2</OptimizationLevel>
|
||||||
<VBEResolution>800x600x32</VBEResolution>
|
<VBEResolution>800x600x32</VBEResolution>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace CMLeonOS.Commands
|
|||||||
Console.WriteLine($"Major: {Version.Major}");
|
Console.WriteLine($"Major: {Version.Major}");
|
||||||
Console.WriteLine($"Minor: {Version.Minor}");
|
Console.WriteLine($"Minor: {Version.Minor}");
|
||||||
Console.WriteLine($"Patch: {Version.Patch}");
|
Console.WriteLine($"Patch: {Version.Patch}");
|
||||||
|
Console.WriteLine($"Type: {Version.VersionType}");
|
||||||
Console.WriteLine($"Full Version: {Version.FullVersion}");
|
Console.WriteLine($"Full Version: {Version.FullVersion}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace CMLeonOS
|
|||||||
{
|
{
|
||||||
public class Shell
|
public class Shell
|
||||||
{
|
{
|
||||||
private string prompt = "/";
|
private string prompt = "#";
|
||||||
private List<string> commandHistory = new List<string>();
|
private List<string> commandHistory = new List<string>();
|
||||||
private FileSystem fileSystem;
|
private FileSystem fileSystem;
|
||||||
private UserSystem userSystem;
|
private UserSystem userSystem;
|
||||||
@@ -90,8 +90,15 @@ namespace CMLeonOS
|
|||||||
// 显示当前文件夹路径作为提示符(彩色)
|
// 显示当前文件夹路径作为提示符(彩色)
|
||||||
string currentPath = fileSystem.CurrentDirectory;
|
string currentPath = fileSystem.CurrentDirectory;
|
||||||
ConsoleColor originalColor = Console.ForegroundColor;
|
ConsoleColor originalColor = Console.ForegroundColor;
|
||||||
|
// Console.ForegroundColor = ConsoleColor.Cyan;
|
||||||
|
// Console.Write($"{currentPath} | {prompt}");
|
||||||
|
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||||
|
Console.Write($"{currentPath}");
|
||||||
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
|
Console.Write($" | ");
|
||||||
Console.ForegroundColor = ConsoleColor.Cyan;
|
Console.ForegroundColor = ConsoleColor.Cyan;
|
||||||
Console.Write($"{currentPath} | /");
|
Console.Write($"{prompt}");
|
||||||
|
|
||||||
Console.ForegroundColor = originalColor;
|
Console.ForegroundColor = originalColor;
|
||||||
var input = Console.ReadLine();
|
var input = Console.ReadLine();
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,11 @@ namespace CMLeonOS
|
|||||||
public static string Major = "1";
|
public static string Major = "1";
|
||||||
public static string Minor = "0";
|
public static string Minor = "0";
|
||||||
public static string Patch = "0";
|
public static string Patch = "0";
|
||||||
|
public static string VersionType = "PreRelease";
|
||||||
|
|
||||||
public static string FullVersion
|
public static string FullVersion
|
||||||
{
|
{
|
||||||
get { return $"{Major}.{Minor}.{Patch}"; }
|
get { return $"{Major}.{Minor}.{Patch}-{VersionType}"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string ShortVersion
|
public static string ShortVersion
|
||||||
@@ -20,7 +21,7 @@ namespace CMLeonOS
|
|||||||
|
|
||||||
public static string DisplayVersion
|
public static string DisplayVersion
|
||||||
{
|
{
|
||||||
get { return $"CMLeonOS v{ShortVersion}"; }
|
get { return $"CMLeonOS v{ShortVersion} ({VersionType})"; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user