diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ceb3866..1d7f18b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: - name: Verify the binary exists run: | - if [ ! -f ./publish/NihilistShell ]; then + if [ ! -f ./publish/NShell ]; then echo "[-] - Binary not found!" exit 1 fi diff --git a/Animation/GlitchOutput.cs b/Animation/GlitchOutput.cs index 48b1321..38cb8a2 100644 --- a/Animation/GlitchOutput.cs +++ b/Animation/GlitchOutput.cs @@ -1,5 +1,5 @@  -namespace NihilistShell.Animation; +namespace NShell.Animation; /// /// The GlitchOutput class provides a method to simulate a "glitch" text animation effect diff --git a/Commands/CdCommand.cs b/Commands/CdCommand.cs index 6ea6832..6769ff7 100644 --- a/Commands/CdCommand.cs +++ b/Commands/CdCommand.cs @@ -1,8 +1,9 @@ -using System.IO; -using NihilistShell.Shell; + +using System.IO; +using NShell.Shell; using Spectre.Console; -namespace NihilistShell.Commands; +namespace NShell.Commands; public class CdCommand : ICustomCommand { diff --git a/Commands/SetThemeCommand.cs b/Commands/SetThemeCommand.cs index 86943d3..3deca51 100644 --- a/Commands/SetThemeCommand.cs +++ b/Commands/SetThemeCommand.cs @@ -1,7 +1,8 @@ -using NihilistShell.Shell; + +using NShell.Shell; using Spectre.Console; -namespace NihilistShell.Commands +namespace NShell.Commands { public class SetThemeCommand : ICustomCommand, IMetadataCommand { diff --git a/NihilistShell.csproj b/NShell.csproj similarity index 100% rename from NihilistShell.csproj rename to NShell.csproj diff --git a/NihilistShell.sln b/NShell.sln similarity index 84% rename from NihilistShell.sln rename to NShell.sln index 4aadb65..ff0a0f6 100644 --- a/NihilistShell.sln +++ b/NShell.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NihilistShell", "NihilistShell.csproj", "{B2886A22-435C-4E2A-A14F-C2A05A0742E6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NShell", "NShell.csproj", "{B2886A22-435C-4E2A-A14F-C2A05A0742E6}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Program.cs b/Program.cs index 76ebe79..8a419c3 100644 --- a/Program.cs +++ b/Program.cs @@ -1,14 +1,15 @@  using Spectre.Console; -using NihilistShell.Shell; -using NihilistShell.Shell.History; -using NihilistShell.Shell.Plugins; -using static NihilistShell.Animation.GlitchOutput; +using NShell.Shell; +using NShell.Shell.Commands; +using NShell.Shell.History; +using NShell.Shell.Plugins; +using static NShell.Animation.GlitchOutput; public class Program { public static readonly string VERSION = "v0.2.1"; - public static readonly string GITHUB = "https://github.com/onihilist/NihilistShell"; + public static readonly string GITHUB = "https://github.com/onihilist/NShell"; public static async Task Main(string[] args) { @@ -18,22 +19,22 @@ public static async Task Main(string[] args) { case "--version": case "-v": - Console.WriteLine($"NihilistShell {VERSION}"); + Console.WriteLine($"NShell {VERSION}"); return; case "--help": case "-h": - Console.WriteLine("Usage: nihilistshell [--version | --help]"); + Console.WriteLine("Usage: nshell [--version | --help]"); return; } } AnsiConsole.Clear(); - AnsiConsole.Markup($"Welcome {Environment.UserName} to NihilistShell !\n\n"); + AnsiConsole.Markup($"Welcome {Environment.UserName} to NShell !\n\n"); AnsiConsole.Markup($"\tversion : {VERSION}\n"); AnsiConsole.Markup($"\tgithub : {GITHUB}\n"); AnsiConsole.Markup("\t\n"); - AnsiConsole.Markup("[bold cyan][[*]] - Booting NihilistShell...[/]\n"); + AnsiConsole.Markup("[bold cyan][[*]] - Booting NShell...[/]\n"); ShellContext context = new(); HistoryManager history = new(); PluginLoader plugins = new(); diff --git a/Shell/Commands/CommandLoader.cs b/Shell/Commands/CommandLoader.cs index f2119af..3d57e91 100644 --- a/Shell/Commands/CommandLoader.cs +++ b/Shell/Commands/CommandLoader.cs @@ -1,7 +1,7 @@  using Spectre.Console; -namespace NihilistShell.Shell; +namespace NShell.Shell.Commands; /// /// CommandLoader is responsible for loading custom and system commands. diff --git a/Shell/Commands/CommandParser.cs b/Shell/Commands/CommandParser.cs index 742bfd4..f1d1a3a 100644 --- a/Shell/Commands/CommandParser.cs +++ b/Shell/Commands/CommandParser.cs @@ -2,7 +2,7 @@ using Spectre.Console; using System.Diagnostics; -namespace NihilistShell.Shell; +namespace NShell.Shell.Commands; /// /// CommandParser class handles loading and execution of shell commands. diff --git a/Shell/Commands/CommandRegistry.cs b/Shell/Commands/CommandRegistry.cs index 4a0aa3d..4c0dd8c 100644 --- a/Shell/Commands/CommandRegistry.cs +++ b/Shell/Commands/CommandRegistry.cs @@ -1,7 +1,7 @@  -using NihilistShell.Commands; +using NShell.Commands; -namespace NihilistShell.Shell; +namespace NShell.Shell.Commands; /// /// CommandRegistry is responsible for registering all custom commands used in the shell. diff --git a/Shell/Commands/ICustomCommand.cs b/Shell/Commands/ICustomCommand.cs index 05935ec..a4fb5c0 100644 --- a/Shell/Commands/ICustomCommand.cs +++ b/Shell/Commands/ICustomCommand.cs @@ -1,5 +1,5 @@  -namespace NihilistShell.Shell; +namespace NShell.Shell; /// /// The ICustomCommand interface defines a contract for implementing diff --git a/Shell/Commands/IMetadataCommand.cs b/Shell/Commands/IMetadataCommand.cs index 4633867..a6edd4c 100644 --- a/Shell/Commands/IMetadataCommand.cs +++ b/Shell/Commands/IMetadataCommand.cs @@ -1,5 +1,5 @@  -namespace NihilistShell.Shell; +namespace NShell.Shell; /// /// The IMetadataCommand interface defines optional metadata diff --git a/Shell/History/HistoryManager.cs b/Shell/History/HistoryManager.cs index 8b2f071..1bd2f0c 100644 --- a/Shell/History/HistoryManager.cs +++ b/Shell/History/HistoryManager.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; -namespace NihilistShell.Shell.History +namespace NShell.Shell.History { /// /// HistoryManager class provide all methods about history. diff --git a/Shell/Plugin/PluginLoader.cs b/Shell/Plugin/PluginLoader.cs index 89bbe67..6137acf 100644 --- a/Shell/Plugin/PluginLoader.cs +++ b/Shell/Plugin/PluginLoader.cs @@ -1,7 +1,7 @@ using Spectre.Console; -namespace NihilistShell.Shell.Plugins +namespace NShell.Shell.Plugins { /// diff --git a/Shell/ShellContext.cs b/Shell/ShellContext.cs index 75a4ecf..a7dca75 100644 --- a/Shell/ShellContext.cs +++ b/Shell/ShellContext.cs @@ -3,10 +3,10 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Nodes; -using NihilistShell.Shell.Themes; +using NShell.Shell.Themes; using Spectre.Console; -namespace NihilistShell.Shell +namespace NShell.Shell { public class ShellContext { diff --git a/Shell/Themes/ThemeLoader.cs b/Shell/Themes/ThemeLoader.cs index ad8b722..88606e4 100644 --- a/Shell/Themes/ThemeLoader.cs +++ b/Shell/Themes/ThemeLoader.cs @@ -1,3 +1,4 @@ + using System; using System.Collections.Generic; using System.IO; @@ -5,7 +6,7 @@ using System.Text.Json; using System.Text.Json.Nodes; -namespace NihilistShell.Shell.Themes +namespace NShell.Shell.Themes { /// /// Enum representing the available default themes. diff --git a/install.sh b/install.sh index b709a9a..22f0f73 100755 --- a/install.sh +++ b/install.sh @@ -27,8 +27,8 @@ if ! command -v dotnet &> /dev/null; then fi USER_PROFILE=$(eval echo ~$USER) -NIHILIST_SHELL_DIR="$USER_PROFILE/.nihilist_shell" -HISTORY_FILE="$NIHILIST_SHELL_DIR/.nihilistshell_history" +NIHILIST_SHELL_DIR="$USER_PROFILE/.nshell" +HISTORY_FILE="$NIHILIST_SHELL_DIR/.nhistory" THEMES_DIR="$NIHILIST_SHELL_DIR/themes" PLUGINS_DIR="$NIHILIST_SHELL_DIR/plugins" @@ -43,8 +43,8 @@ echo " - $THEMES_DIR" echo " - $PLUGINS_DIR" echo " - $HISTORY_FILE" -echo "[*] - Compiling NihilistShell..." -dotnet publish NihilistShell.csproj \ +echo "[*] - Compiling NShell..." +dotnet publish NShell.csproj \ -c Release \ -r linux-x64 \ --self-contained true \ @@ -53,7 +53,7 @@ dotnet publish NihilistShell.csproj \ /p:IncludeNativeLibrariesForSelfExtract=true \ -o ./publish -BINARY="./publish/NihilistShell" +BINARY="./publish/NShell" if [ ! -f "$BINARY" ]; then echo "[-] - Build failed or binary not found at $BINARY" @@ -63,17 +63,17 @@ fi echo "[*] - Applying executable permissions..." chmod +x "$BINARY" -echo "[*] - Copying to /usr/local/bin/ as 'nihilistshell'..." -sudo cp "$BINARY" /usr/local/bin/nihilistshell +echo "[*] - Copying to /usr/local/bin/ as 'nshell'..." +sudo cp "$BINARY" /usr/local/bin/nshell -echo "[*] - Adding /usr/local/bin/nihilistshell to /etc/shells if not already present..." -if ! grep -qx "/usr/local/bin/nihilistshell" /etc/shells; then - echo "/usr/local/bin/nihilistshell" | sudo tee -a /etc/shells > /dev/null - echo "[+] - Added NihilistShell to /etc/shells." +echo "[*] - Adding /usr/local/bin/nshell to /etc/shells if not already present..." +if ! grep -qx "/usr/local/bin/nshell" /etc/shells; then + echo "/usr/local/bin/nshell" | sudo tee -a /etc/shells > /dev/null + echo "[+] - Added NShell to /etc/shells." fi -echo "[*] - Setting NihilistShell as the default shell for user $USER..." -chsh -s /usr/local/bin/nihilistshell -export SHELL=/usr/local/bin/nihilistshell +echo "[*] - Setting NShell as the default shell for user $USER..." +chsh -s /usr/local/bin/nshell +export SHELL=/usr/local/bin/nshell -echo "[+] - Installation complete. Restart your session or run: nihilistshell" +echo "[+] - Installation complete. Restart your session or run: nshell" diff --git a/uninstall.sh b/uninstall.sh index 019c4c2..836ccc1 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -2,7 +2,7 @@ set -e -echo "[*] - Uninstalling NihilistShell..." +echo "[*] - Uninstalling NShell..." echo "[*] - Setting default shell back to /bin/bash..." chsh -s /bin/bash || { @@ -10,7 +10,7 @@ chsh -s /bin/bash || { exit 1 } -BIN_PATH="/usr/local/bin/nihilistshell" +BIN_PATH="/usr/local/bin/nshell" if [ -f "$BIN_PATH" ]; then echo "[*] - Removing $BIN_PATH..." @@ -32,5 +32,5 @@ if [[ "$confirm" =~ ^[Yy]$ ]]; then echo "[+] - ./publish folder deleted." fi -echo "[+] - NihilistShell has been fully uninstalled." +echo "[+] - NShell has been fully uninstalled." echo "[*] - Restart your terminal to return to bash."