You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever my terminal doesn't convert carriage return to new line (not sure why taht's happening, it seems to be caused by prompts though, for whatever reason), I am unable to submit any prompt, since \r isn't handled.
I think you could either add icrnl in Terminal@setTty or submit on $key == Key::CARRIAGE_RETURN as well, maybe?
I patched via
` public function setTty(string $mode): void
{
$this->initialTtyMode ??= $this->exec('stty -g');
$this->exec("stty $mode icrnl");
}`
in my repo, I'm not quite sure of all the implications of this approach though.
Steps To Reproduce
stty -icrnl php artisan make:request
try to press enter
The text was updated successfully, but these errors were encountered:
I started working on a PR to accept \r (in addition to \n), which seems to work with -icrnl set. However when I went to stage the commit (using git add -p) I found that -icrnl also broke the Enter key in git, which gave me pause. Instead of staging the hunk, it just output ^M.
I don't think that's a reason not to accept \r, but I'm curious whether git's patch mode UI is also broken for you when pressing Enter?
It does indeed, never noticed since I generally have a dedicate pane for git stuff.
Btw I think the issue may be caused by psysh use of less for pagination, whenever the process doesn't terminate gracefully. I'll try to figure out when that happens, using strace or whatever tracking tool is available in macos.
Thanks.
Laravel Prompts Version
0.3.2
Laravel Version
11.31.0
PHP Version
8.3.3
Operating System & Version
macOS 14.5
Terminal Application
alacritty, builtin vscode terminal, etc
Description
Whenever my terminal doesn't convert carriage return to new line (not sure why taht's happening, it seems to be caused by prompts though, for whatever reason), I am unable to submit any prompt, since \r isn't handled.
I think you could either add icrnl in Terminal@setTty or submit on $key == Key::CARRIAGE_RETURN as well, maybe?
I patched via
` public function setTty(string $mode): void
{
$this->initialTtyMode ??= $this->exec('stty -g');
in my repo, I'm not quite sure of all the implications of this approach though.
Steps To Reproduce
stty -icrnl
php artisan make:request
try to press enter
The text was updated successfully, but these errors were encountered: