From e977e503963395da77d171c05a1ecbacc2bf0b76 Mon Sep 17 00:00:00 2001 From: onihilist Date: Fri, 25 Apr 2025 16:29:20 +0200 Subject: [PATCH] fix: path in HistoryManager/PluginLoader/ThemeLoader --- Shell/History/HistoryManager.cs | 2 +- Shell/Plugin/PluginLoader.cs | 4 ++-- Shell/ShellContext.cs | 2 +- Shell/Themes/ThemeLoader.cs | 2 +- install.sh | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Shell/History/HistoryManager.cs b/Shell/History/HistoryManager.cs index 1bd2f0c..67de3a0 100644 --- a/Shell/History/HistoryManager.cs +++ b/Shell/History/HistoryManager.cs @@ -18,7 +18,7 @@ public class HistoryManager public HistoryManager(string? path = null) { - _historyPath = path ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nihilist_shell/.nihilistshell_history"); + _historyPath = path ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nshell/.history"); Load(); } diff --git a/Shell/Plugin/PluginLoader.cs b/Shell/Plugin/PluginLoader.cs index 6137acf..4ae2d3d 100644 --- a/Shell/Plugin/PluginLoader.cs +++ b/Shell/Plugin/PluginLoader.cs @@ -9,14 +9,14 @@ namespace NShell.Shell.Plugins /// public class PluginLoader { - private string PluginFolderPath { get; set; } = $"/home/{Environment.UserName}/.nihilist_shell/plugins"; + private string PluginFolderPath { get; set; } = $"/home/{Environment.UserName}/.nshell/plugins"; public string[] PluginList { get; set; } public int NumberOfPlugins { get; set; } public static PluginLoader Instance { get; private set; } = null!; /// - /// Load all plugins into ~/.nihilist_shell/plugins folder. + /// Load all plugins into ~/.nshell/plugins folder. /// public void LoadPlugins() { diff --git a/Shell/ShellContext.cs b/Shell/ShellContext.cs index a567af1..1eaabe1 100644 --- a/Shell/ShellContext.cs +++ b/Shell/ShellContext.cs @@ -56,7 +56,7 @@ private string[] GetThemePrompt(string themeName, string currentDirectory) string themeDir = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), - ".nihilist_shell", + ".nshell", "themes" ); diff --git a/Shell/Themes/ThemeLoader.cs b/Shell/Themes/ThemeLoader.cs index 854cfb0..4e89d84 100644 --- a/Shell/Themes/ThemeLoader.cs +++ b/Shell/Themes/ThemeLoader.cs @@ -81,7 +81,7 @@ private static string ColorizePathLight(string slashColor, string wordsColor,str } /// - /// Loads a custom theme from the ~/.nihilist_shell/themes/ directory, + /// Loads a custom theme from the ~/.nshell/themes/ directory, /// based on the name found in the theme's JSON file. /// If the directory doesn't exist, it will be created. /// diff --git a/install.sh b/install.sh index 22f0f73..003a809 100755 --- a/install.sh +++ b/install.sh @@ -27,10 +27,10 @@ if ! command -v dotnet &> /dev/null; then fi USER_PROFILE=$(eval echo ~$USER) -NIHILIST_SHELL_DIR="$USER_PROFILE/.nshell" -HISTORY_FILE="$NIHILIST_SHELL_DIR/.nhistory" -THEMES_DIR="$NIHILIST_SHELL_DIR/themes" -PLUGINS_DIR="$NIHILIST_SHELL_DIR/plugins" +N_SHELL_DIR="$USER_PROFILE/.nshell" +HISTORY_FILE="$N_SHELL_DIR/.nhistory" +THEMES_DIR="$N_SHELL_DIR/themes" +PLUGINS_DIR="$N_SHELL_DIR/plugins" echo "[*] - Creating directories/files if they don't exist..."