W3cubDocs

/Nushell

input for platform

Get input from the user.

Signature

> input {flags} (prompt)

Flags

  • --bytes-until-any, -u {string}: read bytes (not text) until any of the given stop bytes is seen
  • --numchar, -n {int}: number of characters to read; suppresses output
  • --suppress-output, -s: don't print keystroke values

Parameters

  • prompt: prompt to show the user

Input/output types:

input output
nothing string

Examples

Get input from the user, and assign to a variable

>letuser_input= (input)

Get two characters from the user, and assign to a variable

>letuser_input= (input--numchar2)

Subcommands:

name type usage
input list Builtin Interactive list selection.
input listen Builtin Listen for user interface event

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/input.html