Commands Broken in Integrated Terminal Due to PAGER Setting

Describe the Bug

Commands Broken in Integrated Terminal Due to PAGER Setting
Cursor’s integrated terminal sets PAGER='sh -c "head -n 10000 | cat"' which breaks git help commands and other git operations.
When I run git help -a in Cursor’s integrated terminal, instead of seeing git help text, I get dozens of “command not found” errors. This makes git help unusable in Cursor.

Steps to Reproduce

  1. Open Cursor
  2. Open integrated terminal (Ctrl/Cmd + `)
  3. Run git help -a
  4. See errors instead of help text

Expected Behavior

Git help text listing available commands

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.4.5 (Universal)
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

Additional Information

TL;DR

Cursor’s integrated terminal sets PAGER='sh -c "head -n 10000 | cat"' which breaks git help commands and other git operations.

The Problem

When I run git help -a in Cursor’s integrated terminal, instead of seeing git help text, I get dozens of “command not found” errors. This makes git help unusable in Cursor.

What Happens

$ git help -a
-bash: add: command not found
-bash: am: command not found
-bash: apply: command not found
-bash: archive: command not found
... (continues for every git command)

Root Cause Found

Cursor is hardcoding this environment variable in its terminal service:

PAGER: 'sh -c "head -n 10000 | cat"'

The sh -c part makes the shell try to execute each line of git’s help output as a command, causing all those errors.

Steps to Reproduce

  1. Open Cursor
  2. Open integrated terminal (Ctrl/Cmd + `)
  3. Run git help -a
  4. See errors instead of help text

Expected vs Actual

  • Expected: Git help text listing available commands
  • Actual: “command not found” errors for every git command

Impact

  • Git help commands don’t work
  • Any git command using pager fails
  • Poor developer experience with git in Cursor
  • Affects all integrated terminals

Workarounds (for now)

  1. Use external terminal instead of integrated terminal
  2. Run unset PAGER in each terminal session
  3. Use git --help instead of git help -a

Suggested Fix

Replace the problematic PAGER with:

PAGER: 'less -R'  // or just remove it entirely

Environment

  • OS: macOS
  • Cursor: Latest stable
  • Shell: Fish (but affects all shells)
  • Git: Latest

Why This Matters

This is a core functionality issue that affects every developer using git in Cursor’s integrated terminal. Git help is essential for learning and discovering git commands.


Has anyone else experienced this issue? Looking for confirmation that this isn’t just my setup.
Is there a Cursor setting to override this PAGER value?

Note: I found this is hardcoded in the Cursor app itself, not in my shell configuration.

Does this stop you from using Cursor

No - Cursor works, but with this issue

actually, further troubleshooting with Cursor revealed that it actually does not help:

But the problematic PAGER is still being set. This suggests that Cursor's hardcoded PAGER is overriding your settings. Let me try a few things: