Skip to content

Commit 46cbbc3

Browse files
committed
stty/flags: List all missing flags that GNU version supports
List the remaining flags that GNU stty support, they cannot be be listed yet since we have no nix support for them, but it's better to keep the lists in sync so that it's easier to enable what will be supported in future
1 parent 0a38630 commit 46cbbc3

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/uu/stty/src/flags.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,14 @@ pub const CONTROL_FLAGS: &[Flag<C>] = &[
6565
Flag::new_grouped("cs7", C::CS7, C::CSIZE),
6666
Flag::new_grouped("cs8", C::CS8, C::CSIZE).sane(),
6767
Flag::new("hupcl", C::HUPCL),
68+
// Not supported by nix.
69+
// Flag::new("hup", C::HUP).hidden(),
6870
Flag::new("cstopb", C::CSTOPB),
6971
Flag::new("cread", C::CREAD).sane(),
7072
Flag::new("clocal", C::CLOCAL),
7173
Flag::new("crtscts", C::CRTSCTS),
74+
// Not supported by nix.
75+
// Flag::new("cdtrdsr", C::CDTRDSR),
7276
];
7377

7478
pub const INPUT_FLAGS: &[Flag<I>] = &[
@@ -120,6 +124,15 @@ pub const OUTPUT_FLAGS: &[Flag<O>] = &[
120124
target_os = "linux",
121125
target_os = "macos"
122126
))]
127+
// Not supported by nix.
128+
// Flag::new("ofill", O::OFILL),
129+
// #[cfg(any(
130+
// target_os = "android",
131+
// target_os = "haiku",
132+
// target_os = "ios",
133+
// target_os = "linux",
134+
// target_os = "macos"
135+
// ))]
123136
Flag::new_grouped("nl0", O::NL0, O::NLDLY).sane(),
124137
#[cfg(any(
125138
target_os = "android",
@@ -377,6 +390,14 @@ pub const CONTROL_CHARS: &[(&str, S)] = &[
377390
("lnext", S::VLNEXT),
378391
// Discards the current line.
379392
("discard", S::VDISCARD),
393+
// deprecated compat option.
394+
// ("flush", S::VFLUSHO), // Not supported by nix
395+
// Status character
396+
// ("status", S::VSTATUS), // Not supported by nix
397+
// Minimum number of characters for noncanonical read.
398+
// ("min", S::VMIN),
399+
// Timeout in deciseconds for noncanonical read.
400+
// ("time", S::VTIME),
380401
];
381402

382403
/// This constant lists all possible combination settings, using a bool to represent if the setting is negatable

0 commit comments

Comments
 (0)