diff --git a/src/parser.rs b/src/parser.rs new file mode 100644 index 0000000..c92a80d --- /dev/null +++ b/src/parser.rs @@ -0,0 +1,11 @@ +use crate::command::{CommandSequence, UnixProgram}; + +pub fn parse_command_line(line: String) -> CommandSequence { + let /*mut*/ command_sequence = CommandSequence::new(); + + let argv = line.split_whitespace().map(|s| s.to_string()).collect(); + let _command = UnixProgram::new().argv(argv); + // command_sequence.add(command); + + command_sequence +}