mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 20:57:49 +02:00
Add multiline example for input
command (#16329)
# Description Adds an example that documents how to use `input --reedline` to collect multiple lines of input from the user I also removed an extraneous and inconsistent space in the following example. # User-Facing Changes Documentation addition # Tests + Formatting I did not run any tests or autoformatters because of the docs-only nature of the change, and the fact that I copy-pasted the format from an existing example. If the autoformatter is unhappy, I apologize. # After Submitting This PR should automatically update the docs site at the next release, so no need to do anything there. --------- Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
@ -218,9 +218,14 @@ impl Command for Input {
|
||||
example: "let user_input = (input --default 10)",
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
description: "Get multiple lines of input from the user (newlines can be entered using `Alt` + `Enter` or `Ctrl` + `Enter`), and assign to a variable",
|
||||
example: "let multiline_input = (input --reedline)",
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
description: "Get input from the user with history, and assign to a variable",
|
||||
example: "let user_input = ([past,command,entries] | input )",
|
||||
example: "let user_input = ([past,command,entries] | input --reedline)",
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
|
Reference in New Issue
Block a user