Refactored internals for builtins inside of pipelines
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user