command : ajout fonction colon

This commit is contained in:
Ahurac 2024-04-15 13:23:01 +02:00
parent 41cfc8c768
commit 341e04819e
2 changed files with 6 additions and 1 deletions

View file

@ -31,3 +31,7 @@ pub(super) fn cd(args: &Vec<String>) -> ExitCode {
exit_code
}
pub(super) fn colon(_args: &Vec<String>) -> ExitCode {
ExitCode::success()
}

View file

@ -24,8 +24,9 @@ impl Builtin {
let mut args = argv.clone();
let program = args.remove(0);
let function = match program.as_str() {
let function: Option<BuiltinFunction> = match program.as_str() {
"cd" => Some(builtins::cd),
":" => Some(builtins::colon),
_ => None,
};