Bug Report: Cursor Terminal Interface Rejects Multiline Commands
Description
The terminal interface in Cursor rejects commands containing newlines with the error: “Command contains newline characters. Please write a single command without newlines.” This prevents users from executing standard multiline terminal commands directly, which is a common workflow in regular terminals.
Steps to Reproduce
- Open Cursor’s AI assistant
- Ask the assistant to run a multiline command, such as:
echo "This is line 1 This is line 2 This is line 3"
- Observe the error:
Command contains newline characters.
Impact
This limitation affects several common terminal workflows:
- Writing multiline git commit messages
- Creating commands with heredocs
- Running multiline scripts directly
- Using GitHub CLI with formatted content
While there are workarounds (using escaped newlines with -e
flag or creating temporary script files), these require extra steps and additional LLM queries, making the process less efficient.
Environment
- Operating System: macOS
- Shell: Fish shell
- Cursor Version:
Version: 0.47.1 (Universal)
VSCode Version: 1.96.2
Commit: aafb3fe1326c939656bd06f325a9e17679aeec70
Date: 2025-03-11T19:21:10.527Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.3.0
Does this stop you from using Cursor?
No, but it requires inefficient workarounds that consume more LLM queries than necessary. I’ve implemented custom rules to handle this, but a direct fix would improve the user experience significantly.
Screenshot of reproduction with longer context: