From 76063511cb203ea4133db74bd325bfd2e8a5b6c9 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Wed, 24 Dec 2025 20:14:19 +0900 Subject: [PATCH] is_a_tty.sh: Reduce lines --- tests/fixtures/nohup/is_a_tty.sh | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/tests/fixtures/nohup/is_a_tty.sh b/tests/fixtures/nohup/is_a_tty.sh index 1eb0fb5229e..aecd2e22dc7 100644 --- a/tests/fixtures/nohup/is_a_tty.sh +++ b/tests/fixtures/nohup/is_a_tty.sh @@ -1,21 +1,6 @@ #!/bin/bash -if [ -t 0 ] ; then - echo "stdin is a tty" -else - echo "stdin is not a tty" -fi - -if [ -t 1 ] ; then - echo "stdout is a tty" -else - echo "stdout is not a tty" -fi - -if [ -t 2 ] ; then - echo "stderr is a tty" -else - echo "stderr is not a tty" -fi - -true +[ -t 0 ] && echo "stdin is a tty" || echo "stdin is not a tty" +[ -t 1 ] && echo "stdout is a tty" || echo "stdout is not a tty" +[ -t 2 ] && echo "stderr is a tty" || echo "stderr is not a tty" +: