Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
09d4693
Improve label name compliance
dspinellis May 18, 2025
826ebf9
Support the compilation of text (aci) commands
dspinellis May 18, 2025
858c3a6
Implement the i command
dspinellis May 18, 2025
6afd775
Implement a c i commands
dspinellis May 18, 2025
0564f95
Handle empty REs at runtime
dspinellis May 18, 2025
aa66386
Fix compiled data structure patching order
dspinellis May 18, 2025
416c4a7
Escape dollar and caret in BREs
dspinellis May 18, 2025
f844ddd
Fix handling of escaped delimiter
dspinellis May 18, 2025
1360174
Add math torture test
dspinellis May 18, 2025
fddd6c1
Support regular expression back-references
dspinellis May 19, 2025
a0da132
Fix ERE conversion of BRE back-references
dspinellis May 19, 2025
84ca66c
Add Towers of Hanoi test case
dspinellis May 19, 2025
1a6b078
Add Pi calculation test case
dspinellis May 19, 2025
bb9bfb6
Tidy up and document integration tests
dspinellis May 19, 2025
d74e3a7
Fix CI test failures
dspinellis May 19, 2025
7ffb4a4
Optimize away needless RE clone
dspinellis May 19, 2025
fd90cc0
Shorten error mapping code
dspinellis May 19, 2025
f0cceb7
Utilize shadowing to avoid convoluted names
dspinellis May 21, 2025
a233619
Update status
dspinellis May 23, 2025
f7365fa
Add benchmark and comparison scripts
dspinellis May 24, 2025
b31d9d1
Use memchr to speed up line splitting
dspinellis May 24, 2025
a4cee51
Handle failed executions
dspinellis May 24, 2025
25b84bd
Check at runtime for invalid s/// group regerences
dspinellis May 24, 2025
cbe314d
Catch invalid group references at compile time
dspinellis May 24, 2025
eb64104
Support replacement group \0 as synonym for &
dspinellis May 24, 2025
7868f4f
Early exit in substitution
dspinellis May 24, 2025
f18f772
Try to specialize regex retrieval
dspinellis May 24, 2025
a6010ae
Revert "Try to specialize regex retrieval"
dspinellis May 24, 2025
5fad204
Use regex::bytes whenever possible
dspinellis May 25, 2025
90d60b8
Try again to specialize regex retrieval
dspinellis May 24, 2025
28b5eb0
Report performance changes up to 1%
dspinellis May 25, 2025
a67be74
Specialize single replacement multiple groups
dspinellis May 25, 2025
aa12a12
Improve fancy_regex detection RE and tests
dspinellis May 26, 2025
ea3df65
Fix Windows warning
dspinellis May 26, 2025
a069605
Add RE detection and refactor unit tests
dspinellis May 27, 2025
5af9cf6
Implement an efficient literal string matcher
dspinellis May 28, 2025
27bdec6
Merge branch 'optimize' into aci-commands
dspinellis May 28, 2025
428fabe
Implement the r, w, and = commands
dspinellis May 29, 2025
c73f88a
Remove unneeded text field
dspinellis May 29, 2025
18cf3fc
Add l and Q commands, extended with GNU number
dspinellis May 30, 2025
4b547f4
Improve error reporting
dspinellis May 30, 2025
be0a6a1
Remove and fix dead code
dspinellis May 30, 2025
a2e1969
Add in-place editing support
dspinellis May 30, 2025
751621e
Merge remote-tracking branch 'upstream/main' into aci-commands
dspinellis May 30, 2025
84add8a
Merge remote-tracking branch 'upstream/main' into aci-commands
dspinellis May 31, 2025
0b390c0
Merge branch 'main' into aci-commands
sylvestre Jun 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
255 changes: 240 additions & 15 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,47 @@ feat_common_core = [
]

[workspace.dependencies]
assert_fs = "1.1.3"
bytesize = "2.0.0"
chrono = { version = "0.4.37", default-features = false, features = [
"clock",
] }
clap = { version = "4.4", features = ["wrap_help", "cargo"] }
clap_complete = "4.5"
clap_mangen = "0.2"
fancy-regex = "0.14.0"
libc = "0.2.153"
memchr = "2.7.4"
memmap2 = "0.9"
once_cell = "1.21.3"
phf = "0.11.2"
phf_codegen = "0.11.2"
predicates = "3.1.3"
rand = { version = "0.9", features = ["small_rng"] }
regex = "1.10.4"
sysinfo = "0.35"
tempfile = "3.10.1"
textwrap = { version = "0.16.1", features = ["terminal_size"] }
terminal_size = "0.4.2"
uucore = { version = "0.1.0", features = ["libc"] }
xattr = "1.3.1"


[dependencies]
assert_fs = { workspace = true }
clap = { workspace = true }
clap_complete = { workspace = true }
clap_mangen = { workspace = true }
ctor = "0.4.1"
fancy-regex = { workspace = true }
memchr = { workspace = true }
memmap2.workspace = true
once_cell = { workspace = true }
phf = { workspace = true }
predicates = { workspace = true }
sed = { optional = true, version = "0.0.1", package = "uu_sed", path = "src/uu/sed" }
sysinfo = { workspace = true }
terminal_size = { workspace = true }
textwrap = { workspace = true }
uucore = { workspace = true }
uutests = "0.1.0"
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ and other extensions.

## Status

It is currently a work in progress!
This is still a work in progress, but the current version can
already execute complex scripts,
such as solving the Towers of Hanoi puzzle and performing
arbitrary precision integer arithmetic.
The commands `=`, `l`, `r`, and `w`, as well as in-place replacement
are still missing.

## Installation

Expand All @@ -37,13 +42,21 @@ cargo run --release
* In addition to `\n`, other escape sequences (octal, hex, C) are supported
in the strings of the `y` command.
Under POSIX these yield undefined behavior.
* The substitution command replacement group `\0` is a synonym for &.
* A `Q` command (optionally followed by an exit code) quits immediately.
* The `q` command can be optionally followed by an exit code.
* The `l` command can be optionally followed by the output width.
* The `--follow-symlinks` flag for in-place editing.

### Supported BSD and GNU extensions
* The second address in a range can be specified as a relative address with +N.
* In-place editing of file with the `-i` flag.

### New extensions
* Unicode characters can be specified in regular expression pattern, replacement
and transliteration sequences using `\uXXXX` or `\UXXXXXXXX` sequences.
* The `l` command lists Unicode characters using the `\uXXXX` and `\UXXXXXXXX`
sequences.

### Incompatibilities
* The input is assumed to be valid UTF-8 (this includes 7-bit ASCII).
Expand Down
6 changes: 6 additions & 0 deletions src/uu/sed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ categories = ["command-line-utilities"]


[dependencies]
assert_fs = { workspace = true }
clap = { workspace = true }
fancy-regex = { workspace = true }
memchr = { workspace = true }
regex = { workspace = true }
tempfile = { workspace = true }
memmap2 = { workspace = true }
once_cell = { workspace = true }
predicates = { workspace = true }
terminal_size = { workspace = true }
uucore = { workspace = true }

[lib]
Expand Down
Loading
Loading