Compare commits

...

2 Commits

Author SHA1 Message Date
A. Taha Baki
63e68934f6
Numbers proceeded with the escape character ignored fix (#15684)
Fixes #15675

I've added relevant test cases to ensure coverage of the identified bug.
The issue originated from my crate and pertains to the bracoxide
dependency—a bug I’ve internally referred to as IgnorantNumbers. I’ve
submitted a fix and updated the bracoxide dependency accordingly.
2025-05-03 08:10:51 -05:00
Tim Nieradzik
acc152564c
docs: fix available fields in history import command (#15686)
- The ID field cannot be set (see `item_from_record`)
- Fix command line's field name
2025-05-03 08:09:58 -05:00
4 changed files with 18 additions and 4 deletions

4
Cargo.lock generated
View File

@ -761,9 +761,9 @@ dependencies = [
[[package]]
name = "bracoxide"
version = "0.1.5"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f52991c481aa9d7518254cfb6ce5726d24ff8c5d383d6422cd3793729b0962a"
checksum = "3572b24445a122332bb25a2637248d62ca8b567351d98b1194ca4132c61810bd"
[[package]]
name = "brotli"

View File

@ -66,7 +66,7 @@ alphanumeric-sort = "1.5"
ansi-str = "0.8"
anyhow = "1.0.82"
base64 = "0.22.1"
bracoxide = "0.1.5"
bracoxide = "0.1.6"
brotli = "7.0"
byteorder = "1.5"
bytes = "1"

View File

@ -26,7 +26,7 @@ impl Command for HistoryImport {
fn extra_description(&self) -> &str {
r#"Can import history from input, either successive command lines or more detailed records. If providing records, available fields are:
command_line, id, start_timestamp, hostname, cwd, duration, exit_status.
command, start_timestamp, hostname, cwd, duration, exit_status.
If no input is provided, will import all history items from existing history in the other format: if current history is stored in sqlite, it will store it in plain text and vice versa.

View File

@ -376,6 +376,20 @@ mod tests {
);
}
#[test]
fn test_numbers_proceeding_escape_char_not_ignored() {
assert_eq!(
str_expand("1\\\\{a,b}", Span::test_data(), Span::test_data()),
Value::list(
vec![
Value::string(String::from("1\\a"), Span::test_data(),),
Value::string(String::from("1\\b"), Span::test_data(),)
],
Span::test_data(),
)
);
}
#[test]
fn test_examples() {
use crate::test_examples;