update configuration key name

This commit is contained in:
♥ Minnie ♥ 2025-06-09 16:13:26 +08:00
parent 43156a7e8b
commit 5cf09c9b42
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
3 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
-- This table will hold the configuration.
local config = {}
config.aliases = {
config.shellAliases = {
ls = "ls --color=auto",
}

View file

@ -16,7 +16,7 @@ pub fn help() {
println!();
println!("Customization Options:");
println!(" aliases - Define custom aliases for commands");
println!(" shellAliases - Define custom aliases for commands");
println!();
println!("Note: This is a basic implementation. More features and options will be added in future versions.");

View file

@ -9,7 +9,7 @@ use mlua::prelude::*;
// Helper function for resolving aliases.
fn resolve_alias(config: &mlua::Table, cmd: &str) -> Option<String> {
config
.get::<mlua::Table>("aliases")
.get::<mlua::Table>("shellAliases")
.ok()
.and_then(|aliases| aliases.get::<String>(cmd).ok())
}