# Third-party notices ## brush cash absorbs and modifies substantial portions of [brush](https://github.com/reubeno/brush), a bash/POSIX-compatible shell in Rust by Reuben Olinsky. The crates `brush-core`, `brush-parser`, `brush-builtins`, `brush-interactive`, `brush-shell`, `brush-coreutils-builtins` and `brush-test-harness`, and the `xtask` build tooling, originate there and have been modified. Absorbed at upstream commit `737dd57e3fec83448a0358b7099b5ae305e9a853`. Both projects are MIT licensed, so the code is used under the terms below. The copyright notice is reproduced as that licence requires. ``` MIT License Copyright (c) 2024 reuben olinsky Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` ### Modifications Changes made to the absorbed code are marked in-source with `cash (Dnn)` comments referencing the decision in [spec.md](docs/spec.md). As of absorption: - `brush-parser`: `case` constructs are consumed whole inside command substitution, in both the tokenizer and the word parser (§9.1) - `brush-core`: CRLF line terminators in command substitution (D20), UTF-8 BOM stripping when sourcing scripts (D41), the path model in `set_working_dir` and `absolute_path` (D3/D10), and a dependency on `cash-win32` - `brush-builtins`: CRLF line terminators in `read` (D20) - Removed: `brush` (a binstall alias crate), `brush-experimental-builtins`, `fuzz`, `benchmarks`, upstream documentation, CI and release tooling ## posixutils-rs `crates/cash-awk` and `crates/cash-bc` are absorbed and modified from [posixutils-rs](https://github.com/rustcoreutils/posixutils-rs) (`posixutils-awk` and `posixutils-calc` 0.9.0, revision `96bd8a372541cf7e4c427010a5414a40cf20c805`), © 2024 Jeff Garzik, under the MIT License, whose text is in each crate's `LICENSE`. The changes are listed in each crate's `README.md`. ## uutils sed `crates/cash-sed` is absorbed and modified from [uutils/sed](https://github.com/uutils/sed), © 2025 Diomidis Spinellis, under the MIT License, whose text is in [crates/cash-sed/LICENSE](crates/cash-sed/LICENSE). The changes are listed in `research/uutils-sed-evaluation.md`. ## crossterm `crates/cash-crossterm`, the terminal I/O under cash's line editor, is taken and modified from [crossterm](https://github.com/crossterm-rs/crossterm) 0.29.0, © 2019 T. Post and the crossterm contributors, under the MIT License, whose text is in [crates/cash-crossterm/LICENSE](crates/cash-crossterm/LICENSE). The changes are listed in its `README.md`. ## reedline `crates/cash-reedline`, the line editor of cash's prompt, is taken and modified from [reedline](https://github.com/nushell/reedline) 0.51.0, © 2021 the Nushell Project Developers, under the MIT License, whose text is in [crates/cash-reedline/LICENSE](crates/cash-reedline/LICENSE). The changes are listed in its `README.md`. ## uutils coreutils `crates/cash-uutils`, the `cat`, `cp`, `head`, `ln`, `mkdir`, `mv`, `paste`, `pr`, `ptx`, `rm`, `rmdir`, `shred`, `shuf`, `sort`, `tac`, `tail`, `tee` and `uniq` cash runs, is taken and modified from [uutils coreutils](https://github.com/uutils/coreutils) 0.12.0 (`uu_cat`, `uu_cp`, `uu_head`, `uu_ln`, `uu_mkdir`, `uu_mv`, `uu_paste`, `uu_pr`, `uu_ptx`, `uu_rm`, `uu_rmdir`, `uu_shred`, `uu_shuf`, `uu_sort`, `uu_tac`, `uu_tail`, `uu_tee`, `uu_uniq`), © the uutils developers, under the MIT License, whose text is in [crates/cash-uutils/LICENSE](crates/cash-uutils/LICENSE). The changes are listed in its `README.md`. ## lsd `crates/cash-builtins/src/ls_icon_table.rs`, the Nerd Font icons `ls --icons` shows by file name and extension, is generated from the default icon theme of [lsd](https://github.com/lsd-rs/lsd) 1.2.0 (`src/theme/icon.rs`), © the lsd contributors, used under the Apache License 2.0, whose text is in [licenses/lsd-Apache-2.0.txt](licenses/lsd-Apache-2.0.txt). Changes: the two tables were lower-cased, de-duplicated and sorted into Rust constant arrays for a binary search; lsd's theme files, its configuration and the rest of its code are not used. ## sevenz-rust2 `crates/cash-archive/src/sevenz`, the 7z format that `7z` and `7za` read and write, is taken from [sevenz-rust2](https://github.com/hasenbanck/sevenz-rust2) 0.23.0, itself a fork of [sevenz-rust](https://github.com/dyz1990/sevenz-rust), © their authors, used under the Apache License 2.0, whose text is in [licenses/sevenz-rust2-Apache-2.0.txt](licenses/sevenz-rust2-Apache-2.0.txt). Every file of the module came from it and has been modified. Changes: the reader hands out entries in the archive's order with their own CRC checks and 7-Zip's kinds of data problems, maps entries without data that stand between a block's entries, reads the facts 7-Zip lists (physical and headers size, encrypted headers, the start header's version) and copies packed blocks raw; the writer lays the header out as 7-Zip does (alignment, property order, no packed-stream CRCs), copies blocks from another archive, takes a block's entries one by one as they are read (so a file that will not open is left out), ends coder chains explicitly, rounds the LZMA2 dictionary property up, and writes AES as 7-Zip does (2^19 rounds, no salt); Deflate64 is read; brotli, LZ4, zstd, the WebAssembly parts and the file-walking helpers are left out. ## rars `crates/cash-archive/src/rar`, RAR archives read (RAR 1.3 to 7, encrypted too) and written (RAR 2.9 and 5/7, with recovery records), is taken from [rars](https://github.com/bitplane/rars) 0.10.0, © its authors, used under the Apache License 2.0, whose text is in [licenses/rars-Apache-2.0.txt](licenses/rars-Apache-2.0.txt). Every file of the module came from it, and its tests and their archives are in `crates/cash-archive/tests/rar` and `tests/fixtures/rar`. Changes: it is a module of cash-archive, whose features carry its own (`write`, `parallel`, `recovery`, `encryption`); passwords and keys are cleared by a small wipe of its own where it used the `zeroize` crate (the AES key schedules are not); what a damaged archive can reach where it called `unwrap` or `expect` is an error, a poisoned lock gives its data back, and the rest says why it cannot fail; a FILETIME is formatted from its count, as Windows cannot hold every one in a `SystemTime`; a header cipher is cached with its salt only once it is made. ## figlet `crates/cash-figlet/src/render.rs`, how text is laid out (smushing, kerning, wrapping, justification, paragraphs, direction), is ported from `figlet.c` of [FIGlet](http://www.figlet.org/) 2.2.5, and `crates/cash-figlet/src/font.rs` and `control.rs` read fonts and control files as its `readfont` and `readcontrol` do. The 17 fonts in `crates/cash-figlet/fonts` with the suffix `.flf` are FIGlet's own. FIGlet is Copyright (C) 1991, 1993, 1994 Glenn Chappell and Ian Chai, Copyright (C) 1996-2001 John Cowan, Copyright (C) 2002 Christiaan Keet, Copyright (C) 2011 Claudio Matsuoka, used under the BSD 3-Clause License, whose text is in [licenses/figlet-BSD-3-Clause.txt](licenses/figlet-BSD-3-Clause.txt). Changes: the C was rewritten in Rust over cells (a character and its colours) instead of bytes, with wide characters taking two columns; input is Unicode text, so the control files' commands for input encodings are read and not applied; the fonts are unchanged. ## TOIlet fonts The six fonts in `crates/cash-figlet/fonts` with the suffix `.tlf` are [TOIlet](http://caca.zoy.org/wiki/toilet)'s, by Sam Hocevar, used under the Do What The Fuck You Want To Public License, Version 2, whose text is in [licenses/toilet-WTFPL.txt](licenses/toilet-WTFPL.txt). They are unchanged. ## rs-figlet The smusher in `crates/cash-figlet/src/render.rs` started from [rs-figlet](https://github.com/yuanbohan/rs-figlet) 1.0.0 (`figlet-rs`), © its contributors, used under the Apache License 2.0, whose text is in [licenses/rs-figlet-Apache-2.0.txt](licenses/rs-figlet-Apache-2.0.txt). Changes: it was rewritten to follow `figlet.c` line by line over cells, with the empty line's first column, every repeated end mark, character 0 for missing characters, Latin-1 fonts and wide characters as figlet and toilet have them; its zip dependency, its API and its bundled font set are not used. ## font8x8 The 8x8 pixel font in `crates/cash-figlet/src/pixel_data.rs` is [font8x8](https://github.com/dhepper/font8x8) by Daniel Hepper, after Marcel Sondaar's, from the IBM VGA fonts, all in the public domain. Its table of characters for two by four pixels is generated from Unicode 16's `UnicodeData.txt`.