Refactored internals for builtins inside of pipelines

This commit is contained in:
2026-02-24 10:54:24 -05:00
parent cf46303659
commit cd40760ea0
14 changed files with 440 additions and 191 deletions

View File

@@ -32,6 +32,7 @@ pub const ECHO_OPTS: [OptSpec; 4] = [
];
bitflags! {
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct EchoFlags: u32 {
const NO_NEWLINE = 0b000001;
const USE_STDERR = 0b000010;
@@ -60,6 +61,7 @@ pub fn echo(node: Node, io_stack: &mut IoStack, job: &mut JobBldr) -> ShResult<(
borrow_fd(STDOUT_FILENO)
};
let mut echo_output = prepare_echo_args(
argv
.into_iter()
@@ -197,6 +199,7 @@ pub fn prepare_echo_args(
prepared_args.push(prepared_arg);
}
Ok(prepared_args)
}