CodeEditApp/CodeEdit

๐Ÿž Terminal ZSH error

thoven87 opened this issue ยท 3 comments

Description

Opening a zsh shell will yield

/Users/{USER}/.zshrc:.:34: no such file or directory: /Applications/CodeEdit.app/Contents/Resources/codeedit_shell_integration.zsh

To Reproduce

1 - Open a Swift project or any project
2 - Open a new ZSH shell in CodeEdit

Expected Behavior

No error message, just like both iTerm and Terminal.

Version Information

CodeEdit: [0.3.2-alpha]
macOS: [15.1]
Xcode: [16.1]

Additional Context

No response

Screenshots

Screenshot 2024-09-24 at 9 42 22โ€ฏPM

This is caused by the previous method CodeEdit used for shell integration. We used to modify the user's .rc file and add a script there that only activated when CodeEdit was run. This is no longer the case (#1753) since v0.2.0 but that script will now need to be removed from your shell's init file (.zshrc for zsh and .profile for bash).

Since I can see this being an issue for other users who installed the CodeEdit alpha before v0.2.0, here's a command that anyone who's looking to fix this can use to remove the added lines in their profiles.

Bash

sed -i '' '/codeedit_shell_integration.bash/d' ~/.profile

Zsh

sed -i '' '/codeedit_shell_integration.zsh/d' ~/.zshrc

No other shells are affected. You will need to restart your shell to see the changes take effect.

@thecoolwinter I was not able to produce this error? Is it that only users who have installed are affected?

@thecoolwinter I was not able to produce this error? Is it that only users who have installed are affected?

This only affects users who installed CodeEdit before version v0.2.0. If you don't see the error in the terminal, you aren't affected.