Add long options for platform and random (#10776)

This commit is contained in:
Hofer-Julian
2023-10-19 22:04:33 +02:00
committed by GitHub
parent 030e55acbf
commit 4fd2b702ee
9 changed files with 12 additions and 12 deletions

View File

@ -624,7 +624,7 @@ Operating system commands:
},
Example {
description: "Use escape codes, without the '\\x1b['",
example: r#"$"(ansi -e '3;93;41m')Hello(ansi reset)" # italic bright yellow on red background"#,
example: r#"$"(ansi --escape '3;93;41m')Hello(ansi reset)" # italic bright yellow on red background"#,
result: Some(Value::test_string("\u{1b}[3;93;41mHello\u{1b}[0m")),
},
Example {
@ -634,7 +634,7 @@ Operating system commands:
bg: '#ff0000'
attr: b
}
$"(ansi -e $bold_blue_on_red)Hello Nu World(ansi reset)""#,
$"(ansi --escape $bold_blue_on_red)Hello Nu World(ansi reset)""#,
result: Some(Value::test_string(
"\u{1b}[1;48;2;255;0;0;38;2;0;0;255mHello Nu World\u{1b}[0m",
)),

View File

@ -254,12 +254,12 @@ impl Command for InputList {
},
Example {
description: "Return multiple values from a list",
example: r#"[Banana Kiwi Pear Peach Strawberry] | input list -m 'Add fruits to the basket'"#,
example: r#"[Banana Kiwi Pear Peach Strawberry] | input list --multi 'Add fruits to the basket'"#,
result: None,
},
Example {
description: "Return a single record from a table with fuzzy search",
example: r#"ls | input list -f 'Select the target'"#,
example: r#"ls | input list --fuzzy 'Select the target'"#,
result: None,
},
]

View File

@ -54,7 +54,7 @@ impl Command for SubCommand {
},
Example {
description: "Generate random chars with specified length",
example: "random chars -l 20",
example: "random chars --length 20",
result: None,
},
]

View File

@ -60,7 +60,7 @@ impl Command for SubCommand {
},
Example {
description: "Roll 10 dice with 12 sides each",
example: "random dice -d 10 -s 12",
example: "random dice --dice 10 --sides 12",
result: None,
},
]