Skip to content

Commit c650db5

Browse files
committed
Implement compile_addresses
1 parent f1d5566 commit c650db5

File tree

3 files changed

+450
-21
lines changed

3 files changed

+450
-21
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ cargo run --release
2727
## Extensions
2828
### GNU
2929
* Command-line arguments can be specified in long (`--`) form.
30+
* Spaces can precede a regular expression modifier.
31+
32+
### BSD and GNU
33+
* The second address in a range can be specified as a relative address with +N.
3034

3135
### Other
3236
* Unicode characters can be specified in regular expression pattern, replacement

src/uu/sed/src/command.rs

+15
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,21 @@ pub struct Command {
107107
pub next: Option<Box<Command>>, // Pointer to next command
108108
}
109109

110+
impl Default for Command {
111+
fn default() -> Self {
112+
Command {
113+
code: '_',
114+
addr1: None,
115+
addr2: None,
116+
non_select: false,
117+
start_line: Some(0),
118+
text: None,
119+
data: CommandData::None,
120+
next: None,
121+
}
122+
}
123+
}
124+
110125
#[derive(Debug)]
111126
pub enum CommandData {
112127
None,

0 commit comments

Comments
 (0)