Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/cat_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/cat/
// Source: uutils/coreutils@77b3b4170 src/uu/cat/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> cat <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uucore/src/lib/features/extendedbigdecimal.rs
// Source: uutils/coreutils@77b3b4170 src/uucore/src/lib/features/extendedbigdecimal.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/argument.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uucore/src/lib/features/format/argument.rs
// Source: uutils/coreutils@77b3b4170 src/uucore/src/lib/features/format/argument.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/escape.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uucore/src/lib/features/format/escape.rs
// Source: uutils/coreutils@77b3b4170 src/uucore/src/lib/features/format/escape.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/human.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uucore/src/lib/features/format/human.rs
// Source: uutils/coreutils@77b3b4170 src/uucore/src/lib/features/format/human.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uucore/src/lib/features/format/mod.rs
// Source: uutils/coreutils@77b3b4170 src/uucore/src/lib/features/format/mod.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/num_format.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uucore/src/lib/features/format/num_format.rs
// Source: uutils/coreutils@77b3b4170 src/uucore/src/lib/features/format/num_format.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
15 changes: 11 additions & 4 deletions crates/bashkit/src/builtins/generated/format/spec.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uucore/src/lib/features/format/spec.rs
// Source: uutils/coreutils@77b3b4170 src/uucore/src/lib/features/format/spec.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand All @@ -22,7 +22,8 @@ use super::num_format::Prefix;
use super::num_format::UnsignedIntVariant;
use super::parse_escape_only;
use crate::builtins::generated::format::FormatArguments;
use crate::builtins::generated::format_support::locale_aware_shell_escape;
use crate::builtins::generated::format_support::QuotingStyle;
use crate::builtins::generated::format_support::locale_aware_escape_name;
use crate::builtins::generated::format_support::os_str_as_bytes;
use std::io::Write;
use std::num::NonZero;
Expand Down Expand Up @@ -351,8 +352,14 @@ impl Spec {
writer.write_all(&parsed).map_err(FormatError::IoError)
}
Self::QuotedString { position } => {
let s = locale_aware_shell_escape(args.next_string(*position));
writer.write_all(s.as_bytes()).map_err(FormatError::IoError)
let value = args.next_string(*position);
let has_brace = os_str_as_bytes(value)
.is_ok_and(|bytes| bytes.iter().any(|b| matches!(b, b'{' | b'}')));
let style = QuotingStyle::SHELL_ESCAPE.always_quote(has_brace);
let s = locale_aware_escape_name(value, style);
writer
.write_all(s.as_encoded_bytes())
.map_err(FormatError::IoError)
}
Self::SignedInt {
width,
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/ls_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/ls/
// Source: uutils/coreutils@77b3b4170 src/uu/ls/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> ls <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/mktemp_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/mktemp/
// Source: uutils/coreutils@77b3b4170 src/uu/mktemp/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> mktemp <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// and at test time (the invariant assertion). Nothing in the lib's
// runtime path needs it, hence `allow(dead_code)`.
#[allow(dead_code)]
pub const UUTILS_REVISION: &str = "6a7d199ed";
pub const UUTILS_REVISION: &str = "77b3b4170";

pub mod cat_args;
#[allow(clippy::collapsible_if, clippy::unwrap_used)]
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/num_parser.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uucore/src/lib/features/parser/num_parser.rs
// Source: uutils/coreutils@77b3b4170 src/uucore/src/lib/features/parser/num_parser.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/od_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/od/
// Source: uutils/coreutils@77b3b4170 src/uu/od/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> od <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/readlink_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/readlink/
// Source: uutils/coreutils@77b3b4170 src/uu/readlink/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> readlink <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/realpath_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/realpath/
// Source: uutils/coreutils@77b3b4170 src/uu/realpath/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> realpath <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/shuf_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/shuf/
// Source: uutils/coreutils@77b3b4170 src/uu/shuf/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> shuf <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/stat_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/stat/
// Source: uutils/coreutils@77b3b4170 src/uu/stat/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> stat <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/tac_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/tac/
// Source: uutils/coreutils@77b3b4170 src/uu/tac/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> tac <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/tee_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/tee/
// Source: uutils/coreutils@77b3b4170 src/uu/tee/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> tee <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/truncate_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@6a7d199ed src/uu/truncate/
// Source: uutils/coreutils@77b3b4170 src/uu/truncate/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> truncate <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
Loading