laravel/prompts

`Search` function in small width of terminal

utsavsomaiya opened this issue · 6 comments

Laravel Prompts Version

0.1.0

Laravel Version

10.16.1

PHP Version

8.2

Operating System & Version

Linux

Terminal Application

Terminal of vs code and simple Terminal

Description

If I open the terminal from vs code and press the up and down arrow then it is made a new search prompt.

In my linux terminal works fine.

prompt_issue.mp4

Steps To Reproduce

I just install laravel application and make a simple command

I don't know what the Laravel team thinks, but for me this isn't a problem in Prompts, or am I wrong? 🤔

The search and suggest prompts need a minimum terminal height of 8 lines. The others need at least 6 lines.

I can't solve this other than throwing an error saying to increase the terminal height or reduce the font size. I could make it interactive so they can adjust the terminal size and then press enter to continue, but I'd want to see more people having the issue before going that far.

Okay, Jess Thanks..

I just want to ask something to you is Laravel using currently termwind for display the info..

Which is create a new line after info will display.. is it possible to remove the new line :

image

image

May be this method is not capturing the new line. 😢

I just want to ask something to you is Laravel using currently termwind for display the info..

Which is create a new line after info will display.. is it possible to remove the new line :

This shouldn't be an issue once laravel/framework#46772 is merged because we're configuring Laravel to share its output buffer with Prompts, so they should be aware of each other's newlines.

In the meantime, you could add this line yourself.

I've created PR #20 to display a more helpful error message when the terminal height is too small.