Skip to content

zed-recent-projects: Fix non-POSIX shell detection - #28027

Merged
raycastbot merged 3 commits into
raycast:mainfrom
FollowTheProcess:fix/zed-recent-projects
May 17, 2026
Merged

raycastbot merged 3 commits into
raycast:mainfrom
FollowTheProcess:fix/zed-recent-projects

Conversation

@FollowTheProcess

@FollowTheProcess FollowTheProcess commented May 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes the non-POSIX shell detection in the zed-recent-projects to correctly classify more than just fish as non POSIX. I use nushell and this extension doesn't open Zed when I hit enter on the project in the picker.

It didn't open Zed but also didn't flag an error or anything so I just assumed it must just not work or maybe Zed changed since this was released or something but I got curious and on looking into it, it's easily fixable :)

I also added an explicit error when it fails to open in the openSingleFolder case, mirroring the same approach as the openMultiFolder above

Screencast

Build and Run

image image

Picking the Extensions Repo

image

And here it is!

image

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: zed-recent-projects Issues related to the zed-recent-projects extension platform: macOS platform: Windows labels May 17, 2026
@raycastbot

raycastbot commented May 17, 2026 •

Copy link
Copy Markdown
Collaborator

Thank you for your first contribution! 🎉

🔔 @ewgenius @tleo19 @jylamont @pernielsentikaer @tmwrnr @true-real-michael @remorses @vensauro you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="fix/zed-recent-projects"
FORK_URL="https://github.com/FollowTheProcess/extensions.git"
EXTENSION_NAME="zed-recent-projects"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

@greptile-apps

greptile-apps Bot commented May 17, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the non-POSIX shell detection in zed-recent-projects so that shells like nushell, elvish, xonsh, and pwsh correctly fall back to /bin/zsh for the env -i ... -lc invocation — rather than only catching fish as before. It also adds a failure toast to the single-folder openSingleFolder action, mirroring the existing openMultiFolder error handling.

  • Shell detection: Replaces the fragile userShell.endsWith("fish") check with an exported isPosixShell helper that uses path.basename against a Set allowlist (sh, bash, zsh, dash, ksh, ash, mksh), correctly handling shells installed in non-standard paths.
  • Error surfacing: openSingleFolder in search.tsx is now wrapped in try/catch, showing a Toast.Style.Failure toast on failure rather than silently swallowing errors.
  • Tests: New isPosixShell test suite covers absolute paths, non-standard locations, non-POSIX shells, basename-only matching, and edge cases.

Confidence Score: 5/5

Safe to merge; the shell detection fix is well-tested and the error handling change mirrors an existing pattern.

The core logic change is small, focused, and thoroughly tested. The only finding is a non-blocking changelog convention nit (hardcoded date vs. placeholder).

No files require special attention.

Important Files Changed

Filename Overview
extensions/zed-recent-projects/src/lib/utils.ts Introduces isPosixShell helper using a Set allowlist and path.basename, replacing the fragile endsWith("fish") check. Logic is clean and well-documented.
extensions/zed-recent-projects/src/lib/utils.test.ts Adds thorough tests for isPosixShell covering absolute paths, non-standard locations, non-POSIX shells, basename-only matching, and empty/unknown inputs.
extensions/zed-recent-projects/src/search.tsx Wraps openSingleFolder in try/catch with a failure toast, mirroring the existing openMultiFolder pattern. No issues.
extensions/zed-recent-projects/CHANGELOG.md New entry uses hardcoded date 2026-05-17 instead of the required {PR_MERGE_DATE} placeholder.
extensions/zed-recent-projects/package.json Adds FollowTheProcess to the contributors list. Straightforward and correct.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
extensions/zed-recent-projects/CHANGELOG.md:3
Changelog entries in new PRs should use the `{PR_MERGE_DATE}` placeholder rather than a hardcoded date. The date is automatically populated when the PR is merged — using an actual date here will mean the entry is timestamped with the PR creation date rather than the real merge date.

```suggestion
## [Fix Non-POSIX Shell Support] - {PR_MERGE_DATE}
```

Reviews (2): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile

@0xdhrv 0xdhrv self-assigned this May 17, 2026

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved ✅

@raycastbot
raycastbot merged commit 96e7192 into raycast:main May 17, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@FollowTheProcess).

Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.

@justsrc justsrc mentioned this pull request Jun 5, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: zed-recent-projects Issues related to the zed-recent-projects extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants