implemented 'type' and 'wait' builtins
fixed some tcsetpgrp() misbehavior fixed not being able to redirect stderr from builtins
This commit is contained in:
@@ -856,7 +856,7 @@ pub fn expand_proc_sub(raw: &str, is_input: bool) -> ShResult<String> {
|
||||
let mut io_stack = IoStack::new();
|
||||
io_stack.push_frame(io_frame);
|
||||
|
||||
if let Err(e) = exec_input(raw.to_string(), Some(io_stack), false) {
|
||||
if let Err(e) = exec_input(raw.to_string(), Some(io_stack), false, Some("process_sub".into())) {
|
||||
e.print_error();
|
||||
exit(1);
|
||||
}
|
||||
@@ -887,7 +887,7 @@ pub fn expand_cmd_sub(raw: &str) -> ShResult<String> {
|
||||
match unsafe { fork()? } {
|
||||
ForkResult::Child => {
|
||||
io_stack.push_frame(cmd_sub_io_frame);
|
||||
if let Err(e) = exec_input(raw.to_string(), Some(io_stack), false) {
|
||||
if let Err(e) = exec_input(raw.to_string(), Some(io_stack), false, Some("command_sub".into())) {
|
||||
e.print_error();
|
||||
unsafe { libc::_exit(1) };
|
||||
}
|
||||
@@ -2092,7 +2092,7 @@ pub fn expand_aliases(
|
||||
}
|
||||
|
||||
if let Some(alias) = log_tab.get_alias(&raw_tk) {
|
||||
result.replace_range(tk.span.range(), &alias);
|
||||
result.replace_range(tk.span.range(), &alias.to_string());
|
||||
expanded_this_iter.push(raw_tk);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user