mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-12 18:55:09 +00:00
Shell: Add the alias builtin and resolve aliases
This follows the other shells in alias resolution, and resolves the alias only once.
This commit is contained in:
committed by
Andreas Kling
parent
a4627f2439
commit
2915dcfcc3
@@ -306,6 +306,11 @@ void Shell::unset_local_variable(const String& name)
|
||||
m_local_variables.remove(name);
|
||||
}
|
||||
|
||||
String Shell::resolve_alias(const String& name) const
|
||||
{
|
||||
return m_aliases.get(name).value_or({});
|
||||
}
|
||||
|
||||
int Shell::run_command(const StringView& cmd)
|
||||
{
|
||||
if (cmd.is_empty())
|
||||
|
||||
Reference in New Issue
Block a user