forked from extern/nushell
0f600bc3f5
# Description Add an extension trait `IgnoreCaseExt` to nu_utils which adds some case insensitivity helpers, and use them throughout nu to improve the handling of case insensitivity. Proper case folding is done via unicase, which is already a dependency via mime_guess from nu-command. In actuality a lot of code still does `to_lowercase`, because unicase only provides immediate comparison and doesn't expose a `to_folded_case` yet. And since we do a lot of `contains`/`starts_with`/`ends_with`, it's not sufficient to just have `eq_ignore_case`. But if we get access in the future, this makes us ready to use it with a change in one place. Plus, it's clearer what the purpose is at the call site to call `to_folded_case` instead of `to_lowercase` if it's exclusively for the purpose of case insensitive comparison, even if it just does `to_lowercase` still. # User-Facing Changes - Some commands that were supposed to be case insensitive remained only insensitive to ASCII case (a-z), and now are case insensitive w.r.t. non-ASCII characters as well. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` --------- Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
29 lines
697 B
TOML
29 lines
697 B
TOML
[package]
|
|
authors = ["The Nushell Project Developers"]
|
|
description = "Nushell utility functions"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
name = "nu-utils"
|
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-utils"
|
|
version = "0.86.1"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
[[bin]]
|
|
name = "utils"
|
|
path = "src/main.rs"
|
|
bench = false
|
|
|
|
[lib]
|
|
bench = false
|
|
|
|
[dependencies]
|
|
log = "0.4"
|
|
lscolors = { version = "0.15", default-features = false, features = ["nu-ansi-term"] }
|
|
num-format = { version = "0.4" }
|
|
strip-ansi-escapes = "0.2.0"
|
|
sys-locale = "0.3"
|
|
unicase = "2.7.0"
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
crossterm_winapi = "0.9"
|