Skip to content

Commit 173ad5a

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 14ef9bd commit 173ad5a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/uu/stty/src/flags.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// spell-checker:ignore lnext rprnt susp dsusp swtch vdiscard veof veol verase vintr vkill vlnext vquit vreprint vstart vstop vsusp vswtc vwerase werase VDSUSP
1111
// spell-checker:ignore sigquit sigtstp
1212
// spell-checker:ignore cbreak decctlq evenp litout oddp
13+
// spell-checker:ignore cdtrdsr CDTRDSR ofill OFILL dsusp VDSUSP VFLUSHO VSTATUS noncanonical VMIN deciseconds noncanonical VTIME
1314

1415
use crate::Flag;
1516

@@ -65,10 +66,14 @@ pub const CONTROL_FLAGS: &[Flag<C>] = &[
6566
Flag::new_grouped("cs7", C::CS7, C::CSIZE),
6667
Flag::new_grouped("cs8", C::CS8, C::CSIZE).sane(),
6768
Flag::new("hupcl", C::HUPCL),
69+
// Not supported by nix.
70+
// Flag::new("hup", C::HUP).hidden(),
6871
Flag::new("cstopb", C::CSTOPB),
6972
Flag::new("cread", C::CREAD).sane(),
7073
Flag::new("clocal", C::CLOCAL),
7174
Flag::new("crtscts", C::CRTSCTS),
75+
// Not supported by nix.
76+
// Flag::new("cdtrdsr", C::CDTRDSR),
7277
];
7378

7479
pub const INPUT_FLAGS: &[Flag<I>] = &[
@@ -120,6 +125,15 @@ pub const OUTPUT_FLAGS: &[Flag<O>] = &[
120125
target_os = "linux",
121126
target_os = "macos"
122127
))]
128+
// Not supported by nix.
129+
// Flag::new("ofill", O::OFILL),
130+
// #[cfg(any(
131+
// target_os = "android",
132+
// target_os = "haiku",
133+
// target_os = "ios",
134+
// target_os = "linux",
135+
// target_os = "macos"
136+
// ))]
123137
Flag::new_grouped("nl0", O::NL0, O::NLDLY).sane(),
124138
#[cfg(any(
125139
target_os = "android",
@@ -377,6 +391,24 @@ pub const CONTROL_CHARS: &[(&str, S)] = &[
377391
("lnext", S::VLNEXT),
378392
// Discards the current line.
379393
("discard", S::VDISCARD),
394+
// deprecated compat option.
395+
// ("flush", S::VFLUSHO), // Not supported by nix
396+
#[cfg(any(
397+
target_os = "freebsd",
398+
target_os = "dragonfly",
399+
target_os = "ios",
400+
target_os = "macos",
401+
target_os = "netbsd",
402+
target_os = "openbsd",
403+
))]
404+
// Status character
405+
("status", S::VSTATUS),
406+
// Minimum number of characters for noncanonical read.
407+
// We handle this manually.
408+
// ("min", S::VMIN),
409+
// Timeout in deciseconds for noncanonical read.
410+
// We handle this manually.
411+
// ("time", S::VTIME),
380412
];
381413

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

0 commit comments

Comments
 (0)