implemented '<>' redirects, and the 'seek' builtin
'seek' is a wrapper around the lseek() syscall added noclobber to core shopts and implemented '>|' redirection syntax properly implemented fd close syntax fixed saved fds being leaked into exec'd programs
This commit is contained in:
@@ -201,6 +201,7 @@ impl ShErr {
|
||||
pub fn is_flow_control(&self) -> bool {
|
||||
self.kind.is_flow_control()
|
||||
}
|
||||
/// Promotes a shell error from a simple error to an error that blames a span
|
||||
pub fn promote(mut self, span: Span) -> Self {
|
||||
if self.notes.is_empty() {
|
||||
return self;
|
||||
@@ -208,7 +209,9 @@ impl ShErr {
|
||||
let first = self.notes[0].clone();
|
||||
if self.notes.len() > 1 {
|
||||
self.notes = self.notes[1..].to_vec();
|
||||
}
|
||||
} else {
|
||||
self.notes = vec![];
|
||||
}
|
||||
|
||||
self.labeled(span, first)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user