mirror of
https://github.com/sajenim/rush.git
synced 2025-06-28 01:44:21 +08:00
update configuration key name
This commit is contained in:
parent
43156a7e8b
commit
5cf09c9b42
3 changed files with 3 additions and 3 deletions
2
rush.lua
2
rush.lua
|
@ -1,7 +1,7 @@
|
|||
-- This table will hold the configuration.
|
||||
local config = {}
|
||||
|
||||
config.aliases = {
|
||||
config.shellAliases = {
|
||||
ls = "ls --color=auto",
|
||||
}
|
||||
|
||||
|
|
|
@ -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.");
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue