Skip to content

isatty stdin not working #1443

@bpinto

Description

@bpinto

➜ isatty --help

Description

isatty tests if a file or file descriptor is a tty. The argument may be
in the form of a file path, device, or file descriptor number. Without
an argument, standard input is implied.

With stdin as argument:

➜ .oh-my-fish git:(Paulloz-plugin/sprunge) ✗ echo 'foo' | if isatty stdin
                                                     echo 'if'
                                             else
                                                     echo 'else'
                                             end
if

Without an argument:

➜ .oh-my-fish git:(Paulloz-plugin/sprunge) ✗ echo 'foo' | if isatty
                                                     echo 'if'
                                             else
                                                     echo 'else'
                                             end
else

Shouldn't both have the same behaviour? Installed fish from Git (today):

  • 1ffa4d9 - (HEAD, origin/master, origin/HEAD, master) openssl: add instructions for using custom certs (6 days ago)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions