mirror of
https://github.com/uutils/coreutils
synced 2024-12-24 03:53:16 +00:00
Silently accepts ---presume-input-tty
For whatever reason, the following is equivalent, cargo run -- rm --presume-input-tty cargo run -- rm ---presume-input-tty cargo run -- rm -----presume-input-tty cargo run -- rm ---------presume-input-tty Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
This commit is contained in:
parent
978033a241
commit
56f4e809fd
1 changed files with 12 additions and 0 deletions
|
@ -49,6 +49,7 @@ static OPT_PROMPT_MORE: &str = "prompt-more";
|
||||||
static OPT_RECURSIVE: &str = "recursive";
|
static OPT_RECURSIVE: &str = "recursive";
|
||||||
static OPT_RECURSIVE_R: &str = "recursive_R";
|
static OPT_RECURSIVE_R: &str = "recursive_R";
|
||||||
static OPT_VERBOSE: &str = "verbose";
|
static OPT_VERBOSE: &str = "verbose";
|
||||||
|
static PRESUME_INPUT_TTY: &str = "presume-input-tty";
|
||||||
|
|
||||||
static ARG_FILES: &str = "files";
|
static ARG_FILES: &str = "files";
|
||||||
|
|
||||||
|
@ -206,6 +207,17 @@ pub fn uu_app() -> App<'static, 'static> {
|
||||||
.long(OPT_VERBOSE)
|
.long(OPT_VERBOSE)
|
||||||
.help("explain what is being done")
|
.help("explain what is being done")
|
||||||
)
|
)
|
||||||
|
// From the GNU source code:
|
||||||
|
// This is solely for testing.
|
||||||
|
// Do not document.
|
||||||
|
// It is relatively difficult to ensure that there is a tty on stdin.
|
||||||
|
// Since rm acts differently depending on that, without this option,
|
||||||
|
// it'd be harder to test the parts of rm that depend on that setting.
|
||||||
|
.arg(
|
||||||
|
Arg::with_name(PRESUME_INPUT_TTY)
|
||||||
|
.long(PRESUME_INPUT_TTY)
|
||||||
|
.hidden(true)
|
||||||
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name(ARG_FILES)
|
Arg::with_name(ARG_FILES)
|
||||||
.multiple(true)
|
.multiple(true)
|
||||||
|
|
Loading…
Reference in a new issue