diff --git a/src/main.zig b/src/main.zig index f7747a4..ed5da81 100644 --- a/src/main.zig +++ b/src/main.zig @@ -211,11 +211,26 @@ fn cdFn(shell_state: *ShellState, command: [][]const u8, allocator: Allocator) ! } } +fn authorFn(shell_state: *ShellState, command: [][]const u8, allocator: Allocator) !void { + _ = shell_state; + _ = command; + _ = allocator; + print( + \\Author: Robby + \\Description: A shell to promote math! + \\Ask for the source code! + \\ + \\Derived from an earlier version written in C by Spencer. + \\ + , .{}); +} + fn execCommand(command: [][]const u8, shell_state: *ShellState, allocator: Allocator) !u8 { const builtins = comptime .{ .{ "exit", exitFn }, .{ "nomorenumbers", nomorenumbersFn }, .{ "cd", cdFn }, + .{ "author", authorFn }, }; const builtinMap = StaticStringMap(BuiltinFunc).initComptime(builtins);