Home Explore Blog CI



nushell

commands/docs/is-terminal.md
951331fdb507c06b9e8d61fa1547bd96981867c385396cfb00000003000003e8
---
title: is-terminal
categories: |
  platform
version: 0.104.0
platform: |
  Check if stdin, stdout, or stderr is a terminal.
usage: |
  Check if stdin, stdout, or stderr is a terminal.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `is-terminal` for [platform](/commands/categories/platform.md)

<div class='command-title'>Check if stdin, stdout, or stderr is a terminal.</div>

## Signature

```> is-terminal {flags} ```

## Flags

 -  `--stdin, -i`: Check if stdin is a terminal
 -  `--stdout, -o`: Check if stdout is a terminal
 -  `--stderr, -e`: Check if stderr is a terminal


## Input/output types:

| input   | output |
| ------- | ------ |
| nothing | bool   |
## Examples

Return "terminal attached" if standard input is attached to a terminal, and "no terminal" if not.
```nu
> if (is-terminal --stdin) { "terminal attached" } else { "no terminal" }
terminal attached
```

Chunks
72cacbbb (1st chunk of `commands/docs/is-terminal.md`)
Title: is-terminal command in Nushell
Summary
The `is-terminal` command in Nushell checks if stdin, stdout, or stderr is connected to a terminal. It returns a boolean value indicating whether the specified stream is a terminal. Flags allow specifying which stream to check.