From 23b35ac223ce4cf620aa2eee55b853dfd3dfb9ea Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Fri, 6 Sep 2024 16:41:05 -0400 Subject: [PATCH] alias ls to ls --color=auto --- crates/shell/src/commands.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/shell/src/commands.rs b/crates/shell/src/commands.rs index 7dce8ff..1467dda 100644 --- a/crates/shell/src/commands.rs +++ b/crates/shell/src/commands.rs @@ -14,11 +14,13 @@ impl ShellCommand for LsCommand { } fn execute_ls(context: ShellCommandContext) -> ExecuteResult { - let mut args: Vec = vec![OsString::from("ls")]; + let mut args: Vec = vec![OsString::from("ls"), OsString::from("--color=auto")]; + context .args .iter() .for_each(|arg| args.push(OsString::from(arg))); + let exit_code = uu_ls(args.into_iter()); ExecuteResult::from_exit_code(exit_code) }