warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.38k stars 373 forks source link

Logging output to the console interpreted as commands #1481

Open kszys opened 2 years ago

kszys commented 2 years ago

Discord username (optional)

No response

Describe the bug

When an application lunched in background mode outputs (for instance) logging information to the console, it is interpreted by Wrap as command input. A common action is to hit **Enter** to provide breaks in logging output, but in Wrap this leads to an attempt to execute that output.

To Reproduce

Steps to reproduce:

  1. Go to Wrap console
  2. Start a simple one-liner: for i in {1..10}; do echo $i; sleep 1; done&
  3. Press Enter at any time while the script produces output (number 1 through 10, one per line)
  4. Error appears - something like: zsh: command not found: 2

Expected behaviour

I would expect to see an empty line inserted between the output of the script every time I hit **Enter**. This is what happens if the script is run without `&` at the end - i.e., not in the background.

Screenshots

No response

Operating System

MacOS

OS Version

12.3.1

Shell Version

zsh 5.9 (x86_64-apple-darwin21.3.0)

Warp Version

v0.2022.06.06.09.05.stable_01

Additional context

No response

Warp Internal (ignore): linear-label:24888f54-df93-45d5-9bdd-e38f740cac19

No response

elviskahoro commented 2 years ago

Thanks for reporting will report back when there are updates!

xyzzy314 commented 1 year ago

Just wanted to say this issue is plaguing me as well. It's also output from things like "biff" (You have new mail in /var/spool..) as well as kernel messages to the console. Slightly security risk here as well, as if crafted output can be sent unsolicited to a Warp session, and a user merely hits "return", it could result in command execution.