#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ShellCommand {
Begin,
Commit,
Rollback,
Exit,
}
pub fn parse_shell_command(input: &str) -> Option<ShellCommand> {
match input {
":begin" => Some(ShellCommand::Begin),
":commit" => Some(ShellCommand::Commit),
":rollback" => Some(ShellCommand::Rollback),
":exit" | ":quit" | ".exit" | ".quit" => Some(ShellCommand::Exit),
_ => None,
}
}