diff --git a/src/elements/command.rs b/src/elements/command.rs index 99574472..81727919 100644 --- a/src/elements/command.rs +++ b/src/elements/command.rs @@ -5,12 +5,14 @@ pub mod simple; pub mod paren; pub mod brace; pub mod r#while; +pub mod r#if; use crate::{ShellCore, Feeder, Script}; use self::simple::SimpleCommand; use self::paren::ParenCommand; use self::brace::BraceCommand; use self::r#while::WhileCommand; +use self::r#if::IfCommand; use std::fmt; use std::fmt::Debug; use super::{io, Pipe}; @@ -99,5 +101,6 @@ pub fn parse(feeder: &mut Feeder, core: &mut ShellCore) -> Option +//SPDX-License-Identifier: BSD-3-Clause + +use crate::{ShellCore, Feeder, Script}; +use nix::unistd::Pid; +use super::{Command, Pipe, Redirect}; + +#[derive(Debug)] +pub struct IfCommand { + pub text: String, + pub if_elif_scripts: Vec