command : ajout fonction colon
This commit is contained in:
parent
41cfc8c768
commit
341e04819e
2 changed files with 6 additions and 1 deletions
|
@ -31,3 +31,7 @@ pub(super) fn cd(args: &Vec<String>) -> ExitCode {
|
|||
|
||||
exit_code
|
||||
}
|
||||
|
||||
pub(super) fn colon(_args: &Vec<String>) -> ExitCode {
|
||||
ExitCode::success()
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue