Skip to content

Bottom line of output sometimes obscured, only if it is within first 10 lines of output #291935

@meganrogge

Description

@meganrogge

In the TPI, I saw some screenshots/reports of this, but couldn't reproduce.

Consistently reproduces with:

#!/bin/bash

echo ""
echo "Welcome to the interactive script!"
echo "=================================="
echo ""

read -p "Are you ready to begin? (y/n): " ready
echo ""
if [[ "$ready" == "y" || "$ready" == "Y" ]]; then
    echo "Great! Let's go."
else
    echo "Maybe next time!"
    exit 0
fi
echo ""
echo ""

read -p "How are you feeling today? (1-10): " mood
echo ""
echo "You rated your mood as $mood/10."
echo ""
echo ""

read -p "How many cups of coffee have you had today? (0-10): " coffee
echo ""
echo "You've had $coffee cups of coffee."
echo ""
echo ""

read -p "Do you like pizza? (y/n): " pizza
echo ""
if [[ "$pizza" == "y" || "$pizza" == "Y" ]]; then
    echo "Pizza is delicious!"
else
    echo "That's surprising!"
fi
echo ""
echo ""

read -p "On a scale of 1-5, how much do you enjoy coding? " coding
echo ""
echo "You rated coding enjoyment as $coding/5."
echo ""
echo ""

read -p "Do you want to see your summary? (y/n): " summary
echo ""

if [[ "$summary" == "y" || "$summary" == "Y" ]]; then
    echo ""
    echo "=================================="
    echo "Summary:"
    echo "  - Mood: $mood/10"
    echo "  - Coffee cups: $coffee"
    echo "  - Likes pizza: $pizza"
    echo "  - Coding enjoyment: $coding/5"
    echo "=================================="
    echo ""
    echo "Thanks for participating!"
else
    echo "Okay, skipping summary."
    echo "Goodbye!"
fi

The questions are cutoff

Image

Does not repro if questions are all below the first ten lines

#!/bin/bash

echo "######################################"
echo "#                                    #"
echo "#     INTERACTIVE QUIZ SCRIPT        #"
echo "#                                    #"
echo "#   Answer some fun questions and    #"
echo "#   see your personalized summary!   #"
echo "#                                    #"
echo "######################################"
echo ""
echo "Welcome to the interactive script!"
echo "=================================="
echo ""

read -p "Are you ready to begin? (y/n): " ready
echo ""
if [[ "$ready" == "y" || "$ready" == "Y" ]]; then
    echo "Great! Let's go."
else
    echo "Maybe next time!"
    exit 0
fi
echo ""

read -p "How are you feeling today? (1-10): " mood
echo ""
echo "You rated your mood as $mood/10."
echo ""

read -p "How many cups of coffee have you had today? (0-10): " coffee
echo ""
echo "You've had $coffee cups of coffee."
echo ""

read -p "Do you like pizza? (y/n): " pizza
echo ""
if [[ "$pizza" == "y" || "$pizza" == "Y" ]]; then
    echo "Pizza is delicious!"
else
    echo "That's surprising!"
fi
echo ""

read -p "On a scale of 1-5, how much do you enjoy coding? " coding
echo ""
echo "You rated coding enjoyment as $coding/5."
echo ""

read -p "Do you want to see your summary? (y/n): " summary
echo ""

if [[ "$summary" == "y" || "$summary" == "Y" ]]; then
    echo ""
    echo "=================================="
    echo "Summary:"
    echo "  - Mood: $mood/10"
    echo "  - Coffee cups: $coffee"
    echo "  - Likes pizza: $pizza"
    echo "  - Coding enjoyment: $coding/5"
    echo "=================================="
    echo ""
    echo "Thanks for participating!"
else
    echo "Okay, skipping summary."
    echo "Goodbye!"
fi

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releasechat-terminalThe run in terminal tool in chatverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions