FIXED
I added the following to the cursor settings.json
"terminal.integrated.env.osx": {
"FPATH": "/usr/share/zsh/5.9/functions:$FPATH"
},
Description
The integrated terminal in Cursor on macOS fails to properly initialize Zsh, resulting in errors about missing function definitions for compdump and add-zsh-hook. These are standard Zsh functions that work fine in the native macOS Terminal app but fail in Cursor’s terminal, indicating a configuration issue specific to Cursor’s Zsh setup.
Steps to Reproduce
- Launch Cursor on macOS.
- Open the integrated terminal.
- Observe the following error messages in the terminal:
compinit:480: compdump: function definition file not found
/var/folders/rf/t1b4c_cn7sgc_f6tkyg0wsk00000gn/T/mitchfultz-cursor-zsh/.zshrc:188: add-zsh-hook: function definition file not found
/var/folders/rf/t1b4c_cn7sgc_f6tkyg0wsk00000gn/T/mitchfultz-cursor-zsh/.zshrc:189: add-zsh-hook: function definition file not found
sudo ls -l /var/folders/rf/t1b4c_cn7sgc_f6tkyg0wsk00000gn/T/mitchfultz-cursor-zsh
total 40
-rw-r--r--@ 1 mitchfultz staff 472 Mar 13 08:04 .zlogin
-rw-r--r--@ 1 mitchfultz staff 722 Mar 13 08:04 .zprofile
-rw-r--r--@ 1 mitchfultz staff 592 Mar 13 08:04 .zshenv
-rw-r--r--@ 1 mitchfultz staff 5374 Mar 13 08:04 .zshrc
Operating System: macOS 15.3.1
** Cursor Version**:
Version: 0.46.11
VSCode Version: 1.96.2
Commit: ae378be9dc2f5f1a6a1a220c6e25f9f03c8d4e10
Date: 2025-03-07T06:43:50.208Z
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
Impact
This issue doesn’t completely prevent me from using Cursor, but it significantly disrupts the integrated terminal’s functionality. The persistent errors make it difficult to use the terminal effectively for tasks relying on Zsh. My terminal coloring and such are no longer applied.