Skip to content

StdinOptions ​

Stdin settings accepted by .stdin() and by the schema definitions.

Signatures ​

ts
interface StdinOptions {}

Members ​

Properties ​

argv ​

Accept this input on the command line. Set false to omit its flag spellings or positional slot from parsing, help, and completion. Other sources still apply. Cannot be combined with when: 'dash'.

ts
argv?: boolean | undefined;

when ​

When this input reads the stdin stream.

ts
when?: StdinWhen | undefined;

consume ​

Whether this input consumes the stream alone.

ts
consume?: StdinConsume | undefined;

trim ​

Drop one trailing \n, \r\n, or \r from a single value read off the stream, so echo ./dir | mycli delivers './dir'. A string is the one kind that still carries the terminator at that point; every other kind drops it while decoding and is unaffected.

ts
trim?: boolean | undefined;

See Also ​

Released under the MIT License.